|
Posted by Hilarion on 08/23/05 23:10
>> I am new to Javascripting and I am teaching myself. I have some simple
>> code here I need help with.
>>
>> It works fine however if a user enters in data in one text box but not
>> the other, an error message appears (which is correct). Is there a way
>> to keep the entered textbox value if the error message pops up? In
>> other words, If I enter in text in the 'Hourly' textbox but not the
>> yearly, once I hit continue, is there a way to prevent the data from
>> disappearing in the 'Hourly' textbox?
>>
>> [snip]
One more thing: you should not rely only on JavaScript validation.
If the data is submited to the server and is processed there, then
you should also do the validation on server side. Why? Because
someone could read the page (with the form) source and submit
the data manualy (not using the form and this way bypassing the
JavaScript validation) or someone could simply have JavaScript
disabled (or unavailable) in his browser. JavaScript validation
is OK and makes filling web forms easier (user does not have to
wait for server reply to get info about some errors), but it's
not somethin you can rely on.
Hilarion
Navigation:
[Reply to this message]
|