mel - interaction - 2-button dialog code


/ Published in: Mel
Save to your folder(s)

2-button dialog code


Copy this code and paste it in your HTML
  1. {
  2. // create a confirm dialog with a yes and no button. Specif
  3. $response = `confirmDialog -title "Confirm"
  4. -message "Yes or No? It's your choice..."
  5. -button "Yes"
  6. -button "No"
  7. -defaultButton "Yes"
  8. -cancelButton "No"
  9. -dismissString "No"`;
  10. // check response
  11. if( $response == "Yes" ) {
  12. print("User says yes\n");
  13. } else if( $response == "No" ) {
  14. print("User says no\n");
  15. }
  16. }

URL: http://nccastaff.bournemouth.ac.uk/jmacey/RobTheBloke/www/mel/GUI_dialogs.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.