Hi there. ive got a problem when submitting a form via form.submit() method. The page is like this:
i've got a form where the users submits data. Aside, there's a link leading to another page. Where the users presses the submit button there's no problem. The problem is where the user press the link to the other page. If there are data in the input boxes i submit the form via document.form.submit(); method and then the page automagically goes to the other page. However there's a problem: the data are not saved but if a put a alert() just following the document.form.submit(); the data IS saved so i assume that there's no time between the form.submit() and the <a href> element leading to the other page.
The steps i follow when the user presses the link are:
-check if there are data in the input. i use the onkeyup="savechange();" event in every input element and do change = 1 in the function.
-if there are data (change==1) i call document.form.submit();
-then the page redirects automatically to the linked page.
But the data are not saved. However if a put a alert(); call following the submit() form method the data are saved. I need some help to solve this, please.
The alert() you mention is most likely reading what is in the form fields, not what gets POSTed.
If I am off base, show your code for evaluation.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)