Places

 

  • Download
  • Documentation
  • Forums
  • Demo
  • Contact
  • Blog
  • My account

Meteora

Javascript Widgets

Controls

  • Autocomplete
  • Bubble
  • Calendar
  • Carousel
  • Datagrid
  • Dialog
  • Editor
  • Filebrowser
  • Form Control
  • Menu
  • Notebook
  • Picbox
  • Popup
  • Searchlist
  • Selection
  • Spinbutton
  • Tablesort
  • Toolbox
  • Treeview

Features

  • JsonRpc Core

Effects

  • Visual effects

Control.Dialog

Control demo

You just saw it ;). Click here to see it again.

Javascript source


Meteora.uses('Control.Dialog');

Meteora.onStart(
  function() {
    Dialog.prompt('Your password', {
     
      // default value
      'default': '1337h4x0r',

      // action when the user presses OK
      'onOk': function(dialog) {
        if (this.value) {
         
          Dialog.alert('Your password was: '+this.value);
          dialog.close();

        } else {

          Dialog.alert('Please fill the blank');
       
        }
      },

      // action when the user cancels the dialog
      'onCancel': function(dialog) {
        if (this.value) {
         
          Dialog.alert('Please, empty the input first.');
       
        } else {

          Dialog.question('Are you sure to quit?', {
            onYes: function(dialog){
               dialog.close();
               this.close();
            }.bind(dialog)
          });

        }
      }
    });
  }
);

Documentation

If you're looking for more documentation about this widget, you may want to read Control.Dialog documentation

Powered by textmotion

(c) 2008 Astrata Software