How Do I Direct the Browser to a Given URL When Closing the Top Level Program? (Magic xpa 3.x)
When you are using Magic xpa Client-Server, most browser windows are interactive, and the window is waiting for a result from the user. However, when the user is exiting, you will often want to show some window that is just some plain HTML, and not part of the Browser-Client loop. Or, you may want to invoke a different Magic xpa application or program to handle the task when the user exits. This is easily done using Task Property->Exit URL.
Note: The Exit URL hyperlink doesn’t work when the user exits the window by clicking on the X. That sort of exit isn’t under the programmer’s control (to prevent creating unclosable windows). Magic xpa can, however, react to the internal Exit event.
To call a URL when the program ends:
-
Zoom on Task Properties->Advanced->Exit URL. The Hyperlink dialog box will appear.
-
For Hyperlink type, select URL.
-
Enter the URL you want to call.
-
Enter the Destination frame, if you want the URL to appear in a different window or frame. Otherwise it will appear in the current window or frame.
Now, when the program exits, control will go to the URL specified.
To call another Magic xpa program when the program ends:
-
Zoom on Task Properties->Advanced->Exit URL. A Hyperlink dialog box will appear.
-
For Hyperlink type, select Magic xpa program.
-
Enter the Magic xpa Application name. The program you are calling can be in the current application, or a different one.
-
Enter the Public Name of the program you want to call, and any argument string you want to pass.
-
Enter the Destination frame, if you want the URL to appear in a different window or frame. Otherwise it will appear in the current window or frame.
Now, when the program exits, the Magic xpa program will be executed.