Salesforce

How Do I Direct the Browser to a Given URL When Closing the Top Level Program? (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

How Do I Direct the Browser to a Given URL When Closing the Top Level Program? (Magic xpa 4.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.

Displaying a URL on Exit

To call a URL when the program ends:

  1. Zoom on Task Properties->Advanced->Exit URL. The Hyperlink dialog box will appear.

  2. For Hyperlink type, select URL.

  3. Enter the URL you want to call.

  4. 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.

Exiting to a Magic xpa Program

To call another Magic xpa program when the program ends:

  1. Zoom on Task Properties->Advanced->Exit URL. A Hyperlink dialog box will appear.

  2. For Hyperlink type, select Magic xpa program.

  3. Enter the Magic xpa Application name. The program you are calling can be in the current application, or a different one.

  4. Enter the Public Name of the program you want to call, and any argument string you want to pass.

  5. 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.

Reference
Attachment 
Attachment