Hi,
i want when someone clicks on he submit button to show up a confirmation box and if he clicks yes to continue, if clicks no to stay in the form.
I've tested this:
I put
function checkAction(myMessage)
{ result=confirm(myMessage);
if (result==true) { return true; } else { return false; }
}
on the field "Form JavaScript: (without the script tags)"
and
<input class="form_button" name="NEXT" type="submit" value="NEXT" onClick="return checkAction(\'bla bla bla\')" />
on the submit button.
When i open the form on my computer i get the box, when i open it on my site nothing comes up.
Any suggestions?
i want when someone clicks on he submit button to show up a confirmation box and if he clicks yes to continue, if clicks no to stay in the form.
I've tested this:
I put
function checkAction(myMessage)
{ result=confirm(myMessage);
if (result==true) { return true; } else { return false; }
}
on the field "Form JavaScript: (without the script tags)"
and
<input class="form_button" name="NEXT" type="submit" value="NEXT" onClick="return checkAction(\'bla bla bla\')" />
on the submit button.
When i open the form on my computer i get the box, when i open it on my site nothing comes up.
Any suggestions?
Hi dapa,
That looks Ok, try using FireBug in FireFox to debug it on your site.
Bob
That looks Ok, try using FireBug in FireFox to debug it on your site.
Bob
Hi,
I don't think you need the slashes before and after the bla bla and its better to do this using a
Cheers
Max
I don't think you need the slashes before and after the bla bla and its better to do this using a
onSubmit="return functionName()"
in the form tag attachment field!Cheers
Max
I've tested onsubmit, but nothing it just goes to the next page instead of asking me with a confirmation box. Any other suggestion? I'm trying to fix this for about a week and nothing. 😲
Hi dpap,
try it with a simple JS code like
if your settings is correct then your form should never submit, is is fine ?
Cheers
Max
try it with a simple JS code like
function functionname { return false; }
if your settings is correct then your form should never submit, is is fine ?
Cheers
Max
This topic is locked and no more replies can be posted.