Purpose
Embed an HTML menu

A user menu that goes beyond the normal GuiXT means, such as buttons, group boxes, texts and images, can be realized by embedding an HTML page.

Solution
- Implement the menu as HTML page
- Embed the HTML page into the SAP GUI window with "Control"
- Use connectHTML and JavaScript to call up an InputScript from HTML

Example
To show the principle we implement the following menu:

 


When the user clicks on one of the images, we call an InputScript and pass the selected city as parameter. The InputScript can now perform arbitrary actions, such as executing a transaction. For the example we only show the selected city:

GuiXT
// parameter passed from HTML page
 Parameter DEST
 
 // display a test message
 Message "&U[DEST]" -statusline
 
 // return
 Return

 

GuiXT

del X[IMAGE_CONTAINER]
 
Control (1,1) (12.5,97.6) progID="file://menu100.html" name="mymenu"
 
connectHTML name="mymenu"

 

HTML page

HTML

Components
InputAssistant + Controls