Register to DropDownExtender events

Last post 04-21-2008 11:31 AM by jshallard. 1 replies.

Sort Posts:

  • Register to DropDownExtender events

    04-18-2008, 11:32 AM
    • Loading...
    • jshallard
    • Joined on 08-11-2003, 3:44 AM
    • Gulf Breeze, Florida
    • Posts 140

    I have a javascript function "myFunction()".  I would like this to be called every time the DropDownExtender drops down!  Could someone point me in the right direction about how to do this?

    I think that it basically involves the following steps, but I could use a little help with the implementation:

    - Give the DropDownExtender a behaviourID
    - Grab the DropDownExtender using "$find('BehaviourID');
    - Somehow hook myFunction() up to the DropDownExtender!

     
    Thanks for any help
     

  • Re: Register to DropDownExtender events

    04-21-2008, 11:31 AM
    Answer
    • Loading...
    • jshallard
    • Joined on 08-11-2003, 3:44 AM
    • Gulf Breeze, Florida
    • Posts 140

     OK - so i have figured it out.  For all those who are interested, once you have grabbed the Ajax.Net object using $find(), you can simply subscribe to events using the "add_..." methods.  Just examine which of these are available using a javascript debugger such as firebug.

    E.G. If i want to perform an action when the Ajax.Net toolkit drops down, i can simply do the following:

             function pageLoad() {
                var bhvDdl = $find("bhvDdl");
               
                //register
               
    bhvDdl .add_showing(showing);
            }       

            function showing(){
                alert("showing");
            }


     Si!

Page 1 of 1 (2 items)
Microsoft Communities
Page view counter