Reply
caching whats input on forms
Old 04-18-2005, 06:32 PM caching whats input on forms
capetek's Avatar
Extreme Talker

Posts: 229
Location: Massachusetts
Hello everyone,

I have a problem, I have a pretty big form im making and if theres errors on submitting (like for instance the user didnt fill out all fields) they have to hit back and now retype all the information. Im wondering if there is a java script that will cache what was imput into those fields so if you press back or have to go back its still there. Or even if that cant be done maybe a little popup box that gives you a error like *all required fields are not filled out please fill them all out*

thanks for your help on this
__________________
Anthony LeBoeuf
Cape-Tek IT Solutions
www.cape-tek.com
Great hosting at affordable pricing!
capetek is offline
Reply With Quote
View Public Profile Visit capetek's homepage!
 
When You Register, These Ads Go Away!
Old 04-18-2005, 08:05 PM
Phaedrus's Avatar
Ultra Talker

Posts: 271
Location: CA
Using javascript, the form shouldn't be submitted in the first place if it's incorrect. That's the advantage of client-side validation. Build your validation function, and then include it in the "onSubmit" attribute of the form or the "onClick" attribute of the submit button.
__________________
Free Teacher Websites
Phaedrus is offline
Reply With Quote
View Public Profile
 
Old 04-18-2005, 09:33 PM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
You could write the page in ASP.NET - it has a handy feature called 'Viewstate' which does pretty much exactly what you're describing.

Also, if you use Javascript validation, don't forget to leave the server side validation in place because not everyone has JavaScript turned on. Also make sure that turning off JavaScript doesn't make it impossible to submit the form.

ASP.NET has some great form validation controls, and gives you the ability to write your own. It handles both client and server side validation for you.
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"
Inoxia Pyrotechnics Supplies | Surrey Angels Cheerleading Squad
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Reply     « Reply to caching whats input on forms
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 1.09219 seconds with 12 queries