Forums

Problem with JavaScript before redirect

cindom 07 Mar, 2012
When my form is submitted, I want to show an alert dialog confirming to the user that the form was accepted and then, when the user closes the alert dialog, redirect to another page. In the On Submit event list, I have a Load JS event and a ReDirect User event. In the Load JS event, I have only an alert statement, currently:

alert("on submit");

The alert statement does not execute. However, if I change the ReDirect User event to a Show Thanks Message event, I do get the alert dialog. Any help would be appreciated.
GreyHead 21 Apr, 2012
Hi cindom,

JavaScript will only work in the browser - i.e. in some action that displays HTML to the user.
You could add it in the ON Load event linked to the submit button being clicked.

Bob
This topic is locked and no more replies can be posted.