/ Published in: Mel

mel - interaction - prompt dialog code
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
{ string $text; // create a prompt dialog to request the users name string $result = `promptDialog -title "Hello Window" -message "Enter Name:" -button "OK" -button "Cancel" -defaultButton "OK" -cancelButton "Cancel" -dismissString "Cancel"`; // if OK pressed if ($result == "OK") { // query the entry typed by the user $text = `promptDialog -query -text`; print("HELLO to "+ $text +"\n"); } else { print("fine. I won't say hello then :(\n"); } }
URL: http://nccastaff.bournemouth.ac.uk/jmacey/RobTheBloke/www/mel/GUI_dialogs.html
Comments
