Loading ...
Sorry, an error occurred while loading the content.

YAHOO.widget.Dialog + SELECT

Expand Messages
  • shmooved
    Hi, I ve got a dialog box with an HTML SELECT element, but having problems getting at the selected value. The form is set with a postmethod of none . I also
    Message 1 of 1 , Aug 2, 2006
    • 0 Attachment
      Hi,

      I've got a dialog box with an HTML SELECT element, but having problems
      getting at the selected value. The form is set with a "postmethod" of
      "none". I also have an HTML INPUT "text" element, which I can retrieve
      the value for.

      Works:

      // Input text.

      name = this.getData().name;

      Does not work:

      // Select.

      type = this.getData().type;

      Worked around it like this:

      var typeSelect = document.getElementById('type')

      for (i=0; i < typeSelect.length; i++) {
      if (typeSelect[i].selected) {
      type = typeSelect[i].value
      }
      }

      Ideas?
    Your message has been successfully submitted and would be delivered to recipients shortly.