Results 1 to 2 of 2

Thread: Calling Function from Dialog

  1. #1
    Ext User
    Join Date
    Mar 2007
    Location
    Atlanta, GA
    Posts
    12

    Default Calling Function from Dialog

    Hi Jack, great work, I absolutely love what you have done.

    my question is how do you call a function from within the Basic Dialog demo.

    For example, suppose I want to call a validation function
    when a user clicks the submit button, how do i reference the function.

    --Thanks

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956

    Default

    Suppose you are in a function called createDialog:
    Code:
    var form = getEl('form-id');
    var dlg = new BasicDialog(...);
    
    var handleSubmit = function(){
        ... // validate stuff
        YAHOO.util.Connect.setForm(form.dom);
        YAHOO.util.Connect.asyncRequest(...);
        dlg.hide();
    };
    dlg.addButton('Submit', handleSubmit);

Similar Threads

  1. Calling all websites!
    By brian.moeskau in forum Community Discussion
    Replies: 42
    Last Post: 21 Jul 2007, 5:03 PM
  2. Call function after dialog loads?
    By Nullity in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 1 Mar 2007, 7:33 AM
  3. How to refer to a Function 1 Image() Array in Function 2?
    By Bobafart in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 24 Feb 2007, 8:33 PM
  4. checkHandler is calling passed function 2 times
    By n01champion in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 23 Feb 2007, 2:00 PM
  5. run other function before basic dialog show
    By electric_bit in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 9 Jan 2007, 8:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •