I'm trying to get user confirmation with popup windows (Yes/No/Cancel).
If user click yes, then data sumited. If no, user returned to current form.
I put this on Form JavaScript:
and this on Form HTML:
But it did'nt work, when i click submit, data submitted without calling my custom javascript.
Can anyone help please??
If user click yes, then data sumited. If no, user returned to current form.
I put this on Form JavaScript:
function confirmAction() {
return confirm("Do you really want this subscription?")
}
and this on Form HTML:
<input value="Send" type="submit" onSubmit="return confirmAction()"/>
But it did'nt work, when i click submit, data submitted without calling my custom javascript.
Can anyone help please??
Hi dion,
That code looks Ok to me - is the form on-line so I can take a look?
Bob
That code looks Ok to me - is the form on-line so I can take a look?
Bob
Hi dion,
It works if you make the submit button action onclick instead of onsubmit. (I think that perhaps you can only use onsubmit in the form tag ??)
Bob
It works if you make the submit button action onclick instead of onsubmit. (I think that perhaps you can only use onsubmit in the form tag ??)
Bob
This topic is locked and no more replies can be posted.