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

How to get the selected menu item from a menu button ...

Expand Messages
  • aichcon
    ... before the user selects something? I am using the following to set the default of a menu on my page: button.set( selectedMenuItem , this.getItem(0)); But
    Message 1 of 2 , Mar 31, 2009
    • 0 Attachment
      ... before the user selects something?

      I am using the following to set the default of a menu on my page:

      button.set("selectedMenuItem", this.getItem(0));

      But when I try to access the activeItem.value for this button I am receiving a null value. Once I click and select an option, this value is populated. Is there any way I can get to that value without having to make a selection?

      Thanks,
      Hakan
    • aichcon
      ... I was able to solve this by using button.get( selectedMenuItem ) ... this value is available whether the user has made a selection or not. Thank you for
      Message 2 of 2 , Apr 1, 2009
      • 0 Attachment
        --- In ydn-javascript@yahoogroups.com, "aichcon" <hbakkalbasi@...> wrote:
        >
        > ... before the user selects something?
        >
        > I am using the following to set the default of a menu on my page:
        >
        > button.set("selectedMenuItem", this.getItem(0));
        >
        > But when I try to access the activeItem.value for this button I am receiving a null value. Once I click and select an option, this value is populated. Is there any way I can get to that value without having to make a selection?
        >
        > Thanks,
        > Hakan
        >

        I was able to solve this by using button.get("selectedMenuItem") ... this value is available whether the user has made a selection or not.

        Thank you for taking a look.
      Your message has been successfully submitted and would be delivered to recipients shortly.