lejo_kl
09-09-2003, 07:22 AM
I am using an ASP page for one of the websites where we post comments from different users onto a page.
I have a form in my page to get some information from user and i have kept a button for the user to submit the form ( Button type is not "submit") ) . I am using an onclick function to validate the page and then submit the form. This function is written in javascript. The contents of form are written to a text file. This is used to later display the comments posted by each of the member onto the same asp page.
But, since I want the contents of the form to be posted to the same page at the top, i am having a peculiar problem.
After submiting the form once if, the user refreshes the page the same data will be posted once again to the asp page and, there will be a duplicate entry written onto to the text file. This will happen each time the page is refreshed. Can anyone please tell me a way to avoid this duplication?
That is i would like to know whether there is any way in javascript to clear the contents of the form once it has been submitted, or some other means by which i can avoid the form being submitted again and again each time the page is refeshed if, the form has been submitted once.
Lejo.
I have a form in my page to get some information from user and i have kept a button for the user to submit the form ( Button type is not "submit") ) . I am using an onclick function to validate the page and then submit the form. This function is written in javascript. The contents of form are written to a text file. This is used to later display the comments posted by each of the member onto the same asp page.
But, since I want the contents of the form to be posted to the same page at the top, i am having a peculiar problem.
After submiting the form once if, the user refreshes the page the same data will be posted once again to the asp page and, there will be a duplicate entry written onto to the text file. This will happen each time the page is refreshed. Can anyone please tell me a way to avoid this duplication?
That is i would like to know whether there is any way in javascript to clear the contents of the form once it has been submitted, or some other means by which i can avoid the form being submitted again and again each time the page is refeshed if, the form has been submitted once.
Lejo.