Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



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

Posts: 229
Location: Massachusetts
Trades: 0
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

Please login or register to view this content. Registration is FREE

Great hosting at affordable pricing!
capetek is offline
Reply With Quote
View Public Profile Visit capetek's homepage!
 
 
Register now for full access!
Old 04-18-2005, 09:05 PM
Phaedrus's Avatar
Ultra Talker

Posts: 271
Location: CA
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE
Phaedrus is offline
Reply With Quote
View Public Profile
 
Old 04-18-2005, 10:33 PM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
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!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Reply     « Reply to caching whats input on forms
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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 0.12949 seconds with 12 queries