Click to See Complete Forum and Search --> : Using form to get information written to a text file


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.

Khalid Ali
09-09-2003, 07:29 AM
JavaScript itself can not do it,you will have to use some other attributory programming language....

lejo_kl
09-09-2003, 07:35 AM
can u tell me using which language and how.. Can i include those with the existing code that i have written?

Khalid Ali
09-09-2003, 09:26 AM
If you search the forums,you will find solutions using ActieXControls or Java.
If you want php solutions,then post a question in the php forums.