09-09-2012 12:53 AM
SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); String dateOfJourney = dateFormat.formatLocal(_dateField.getDate()); dateFormat = new SimpleDateFormat("HH:mm"); String timeOfJourney = dateFormat.formatLocal(_timeField.getDate()); int pin = DeviceInfo.getDeviceId();
i write this code in java for getting a date , actually i need same code in phone gap using java script . i want to ask this question is this work in phonegap or not??
09-09-2012 02:11 AM
09-09-2012 02:49 AM
Thanks sir ...!!
1 question more
is there any way to show button after filling the text in text filed .I am not asking for disble button. i am asking to show button when user fill the text filled, if text filled is blank the button is not display on screen. is this possible
09-09-2012 03:54 AM
Something like that might work:
09-09-2012 05:32 AM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitiona
Hi. sir this is nice code. I check this code like when i get web service resone button is display, it woking fine.
But this keyup event is not fir i think..i used like
09-09-2012 06:05 AM
So, how does it read/execute your source code:
1) HEAD-> script-tag (will not find the textarea since not yet available in DOM) 2) BODY-> textarea + button (now elements are available in DOM)
And in comparison to my source code:
1) BODY-> textarea + button (now elements are available in DOM) 2) BODY-> script-tag (will find the textarea since available in DOM)
For the || operator try to search using google. If you do not know what || means you should try to understand JS in more detail since this is one of many fundamental things you need to know, I think!!
09-09-2012 08:32 AM
I understand every thing but
(e.currentTarget||e.srcElement).value.length||0; can you please explain this please sir...
|| this is OR operator but what is the use here
09-09-2012 10:03 AM
If there isn't any input in eg. the textarea this will fail:
and throw an error, so you can not call it, but using the || (OR) here you can avoid the error and return 0 since there isn't any input and therefor the value.length would be 0 (if there wouldn't be the error).