nested functions in push button - Forum

Forum Navigation
You need to log in to create posts and topics.

nested functions in push button

I am trying to develop a website to run a social science experiment (sociology). The first page needs to have a popup/alertbox/messagebox that has the consent form on in. I need two buttons, one that when the participant accepts the consent form they are sent to the second page for instructions. This would require the GotoPage. The other is a cancel button that redirects them away from the experiment (OpenURL). However I am having difficulty with the syntax and getting this all within one Messagebox function.

The general idea would be:

MessageBox "Consent Form" "This will be the consent form message" "[Proceed], [Close]" ""
if MessageBox "Proceed"
GotoPage "instructions" .secondpage
Endif
if MessageBox"Close"
OpenURL "www.somewebsite.com"
Endif

@pfranck please take a look at the MessageBox command description. You need to include a subroutine in order to get the user response. Please take a look at the attached sample (right-click to download).

MessageBox
Display a themed dialog message box with a custom message and buttons. To determine which button was clicked, create a Subroutine with a single integer parameter. This parameter will contain the number of the selected button (1 for first, 2 for second... or zero for none).

Uploaded files:
  • You need to login to have access to uploads.