Hi to all,
I have made a script that uses both JavaScript and PHP. The script has a
form and when it is submitted, a JavaScript confirmation box appears, asking
the user to confirm their action. If they click No, the action is cancelled
and if they click Yes, the form is submitted.
If only it were that simple... The problem is that when the form is
submitted using form.submit() within a JavaScript function, no form
variables are being sent through the POST method, however, if I remove all
JavaScript and then submit the form, everything works fine.
The complications are that I need the confirmation boxes and I need to use a
form, not just a hyperlink, because I need to pass the contents of a text
field through the POST method too...
Any ideas?
I have made a script that uses both JavaScript and PHP. The script has a
form and when it is submitted, a JavaScript confirmation box appears, asking
the user to confirm their action. If they click No, the action is cancelled
and if they click Yes, the form is submitted.
If only it were that simple... The problem is that when the form is
submitted using form.submit() within a JavaScript function, no form
variables are being sent through the POST method, however, if I remove all
JavaScript and then submit the form, everything works fine.
The complications are that I need the confirmation boxes and I need to use a
form, not just a hyperlink, because I need to pass the contents of a text
field through the POST method too...
Any ideas?
Comment