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
Example
//
parameter passed from HTML page
GuiXT script
del
X[IMAGE_CONTAINER]
HTML page <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="en" http-equiv="Content-Language" /> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <script type="text/javascript"> // GuiXT object var guixt; // called by connectHTML, passes GuiXT object function guixt_initialize(obj) { guixt = obj; }; function select(destination) { // start InputScript "myscript.txt" // pass selected destination as parameter DEST guixt.Input("U[DEST]:" + destination + ";OK:/0,process=myscript.txt"); }; </script> </head> <body style="margin: 10px; background-color: white"> <span style="font-family: Verdana; font-size: 36px; color: #808080"> Please select your destination:</span><br /> <img style="height:180px; margin-right:10px; cursor:pointer;" src="rome.png" alt="Rome" title="Destination Rome" onclick="select('Rome');"/> <img style="height:180px; margin-right:10px; cursor:pointer;" src="london.png" alt="London" title="Destination London" onclick="select('London');"/> </body> </html> |
Components |