Forum Moderators: open

Message Too Old, No Replies

How to reload page without loosing variables in form

Use for the captcha method

         

tomda

1:10 pm on Sep 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a registration form with a captach image.
Below the picture, I have included a javascript link to reload the page if the image is not clear. Nonetheless, when clicking on reload, all datas filled in the forms are lost.

What should I do to reload the page (and reload a new captcha picture) without loosing data in the forms?

I know it can't be done in Javascript because it is a client-side script (and the captcha is a server-side script) but I though it could be possible to store data in javascript when the user click reload().

I don't know how but - I have done some reading yesterday in my Javascript Bible - I saw that it is possible to have a backup of the data filled in the form when the user click on reset().

Thank you

pankajpatil

5:53 am on Sep 28, 2005 (gmt 0)



Hi
Check if this works

if you are using serverside scripting as java then you can use the javabean. before refreshing the page you have to call a page which will store the form data in the bean and then you can redirect to that page. In that page you have to check if the javabean have value null. if the value are not null then you have to take the value from the bean.

if you are using sreverside scripting as Microsoft then make use of session.

With regards
pankaj

tomda

8:02 am on Sep 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks.
Sadly, I never used JAVA. I'll try to see if I can work with
session. Good idea!