| 
 Posted by mbstevens on 06/24/13 11:31 
Ed Jay wrote: 
 
> Two questions: 
>  
> 1. How can I either test the error while still on Page 1? 
JavaScript, but you still need to test server side because this won't  
work for every visitor.  If it gets to page 1 with bad values,  
regenerate the page with all but the bad values filled in, and a message  
added indicating values to be corrected. 
>  
> 2. How do I test for the Page 1 error on Page 2 and automatically return 
>     the op to Page 1 for corrections? 
CGI.pm saves state.  You'll probably be able to figure out what you need  
from looking at the following pages: 
 
http://www.foo.be/docs/tpj/issues/vol1_2/tpj0102-0004.html 
 
http://www.perl.com/doc/manual/html/lib/CGI.html#SAVING_THE_STATE_OF_THE_SCRIPT_T 
 
....and Google for "CGI.pm save state" for more.
 
  
Navigation:
[Reply to this message] 
 |