Results 1 to 3 of 3

Thread: DwtSelect and detecting selection

  1. #1
    Join Date
    Feb 2007
    Posts
    2
    Rep Power
    8

    Default DwtSelect and detecting selection

    Greetings,

    I am working on a zimlet that requires a few different select drop downs. The choice in the first drop down determines the choices in the second drop down. How would one detect a choice being made in a drop down? DwtSelectionEvent?

    If this is the case, could you post a quick example as I am having a bit of trouble with this one.

    Thanks!

    SP

  2. #2
    Join Date
    Nov 2006
    Posts
    14
    Rep Power
    8

    Default

    You can do that by adding a change listener. Use this line of code to add the listener to your select:
    Code:
    MyClass.prototype.createSelect =
    function() {
    	var select = new DwtSelect(....);
    	select.addChangeListener(new AjxListener(this, this._changeListener));
    };
    And write a method to handle the change event.
    Code:
    MyClass.prototype._changeListener =
    function(event) {
    	// Do something interesting here.
    	alert('Changed');
    };

  3. #3
    Join Date
    Feb 2007
    Posts
    2
    Rep Power
    8

    Default

    Thanks, I will try that out.

    SP

Posting Permissions

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