06-25-2012 05:47 AM
<label for="frmAllegation-TimeReported">Reported Time</label>
<input type="time" name="Reported Time" id="frmAllegation-TimeReported" onchange="changeSave(this);" /><br>
<label for="frmAllegation-IncinOccDate">Date Started</label>
<input type="date" name="Reporting Date" id="frmAllegation-IncinOccDate" onchange="changeSave(this);" /><br>
<label for="frmAllegation-IncinOccText">Date Text</label>
<input type="text" name="Reporting Text" id="frmAllegation-IncinOccText" onchange="changeSave(this);" /><br>
function changeSave(frmInput)
{
alert("Changed");
}
When using time,date,select on change isnt called, Its strange because if you type stuff in its called but when blakcberry native date,time or option list pops up and you it pritns it to the form but doesnt call on save...
Work arounds or solutions anyone?
Thanks for support ![]()
06-25-2012 06:10 AM
Is that on the PlayBook or on phones?
I had that problem on the playbook with a date field, managed to workaround it using onBlur instead of onChange ![]()
06-25-2012 06:11 AM
06-25-2012 06:28 AM
Didn't try it on the phone, sorry.
Although if it does work, it will call the function even if the data doesn't change. If the code is very performance-intensive, you can add your own manual check before running it.
06-25-2012 06:37 AM
06-25-2012 06:37 AM
06-25-2012 06:48 AM
If you are just saving a variable, does it hurt to save it again even if it didn't change?
Not sure which of the ways runs more code
)
06-25-2012 07:04 AM
06-25-2012 07:06 AM - edited 06-25-2012 07:06 AM
So what if it has a value and the user changes it by deleting it?
won't it save the "" anyway? ![]()
I guess that requires an extra check then...
06-25-2012 07:14 AM