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

YUI Button- Help required

Expand Messages
  • Thomas James
    Hi all i am trying to acheive the following. can anyone point me in the correct direction i have a link and also a menu which comes on mouseover of the link. i
    Message 1 of 3 , Feb 2, 2008

      Hi all

      i am trying to acheive the following. can anyone point me in the correct direction

      i have a link and also a menu which comes on mouseover of the link. i need to acheive this using YUI Button.currently trying to do it using split button. i did manage to have the button initialised with the label as that of the <A> tag and also with the menu which comes on mouseover. but it is at the next step that i am getting stuck.i need to set different links for the main button as well as for the items in the menu

      currentl trying to generate button using html\markup

      <script type="text/javascript">
        function init(){
         var oSplitButton2 = new YAHOO.widget.Button("splitbutton2", { type: "split", label: "Quote", menu: "splitbutton2select" });
        }
        YAHOO.util.Event.onDOMReady(init);
       </script>
                  <input type="button" id="splitbutton2" name="splitbutton2_button">
                  <select id="splitbutton2select" name="splitbutton2select">
                      <option value="Quote All">Quote All</option>
                    
                  </select>

      now once the button is rendered, i need to set one link on Quote (ie on the main button itself) and then a different link for Quote All

      can anyone help me out please?

      TIA
      thomas

       

    • Thomas James
      Hi all i am trying to acheive the following. can anyone point me in the correct direction i have a link and also a menu which comes on mouseover of the link. i
      Message 2 of 3 , Feb 4, 2008

        Hi all

        i am trying to acheive the following. can anyone point me in the correct direction

        i have a link and also a menu which comes on mouseover of the link. i need to acheive this using YUI Button.currently trying to do it using split button. i did manage to have the button initialised with the label as that of the <A> tag and also with the menu which comes on mouseover. but it is at the next step that i am getting stuck.i need to set different links for the main button as well as for the items in the menu

        currentl trying to generate button using html\markup

        <script type="text/javascript">
          function init(){
           var oSplitButton2 = new YAHOO.widget.Button("splitbutton2", { type: "split", label: "Quote", menu: "splitbutton2select" });
          }
          YAHOO.util.Event.onDOMReady(init);
         </script>
                    <input type="button" id="splitbutton2" name="splitbutton2_button">
                    <select id="splitbutton2select" name="splitbutton2select">
                        <option value="Quote All">Quote All</option>
                      
                    </select>

        now once the button is rendered, i need to set one link on Quote (ie on the main button itself) and then a different link for Quote All

        can anyone help me out please?

        TIA
        thomas

         


      • Todd Kloots
        Thomas - Button is not currently designed to support Split Buttons based on elements. However, you could specify separate click event handlers for the
        Message 3 of 3 , Feb 8, 2008
          Thomas -

          Button is not currently designed to support Split Buttons based on <A>
          elements. However, you could specify separate click event handlers for
          the Button and its corresponding Menu that leverage document.location to
          send the user off to a given URL. Make sense?

          - Todd

          Thomas James wrote:
          >
          > Hi all
          >
          > i am trying to acheive the following. can anyone point me in the
          > correct direction
          >
          > i have a link and also a menu which comes on mouseover of the link. i
          > need to acheive this using YUI Button.currently trying to do it using
          > split button. i did manage to have the button initialised with the
          > label as that of the <A> tag and also with the menu which comes on
          > mouseover. but it is at the next step that i am getting stuck.i need
          > to set different links for the main button as well as for the items in
          > the menu
          >
          > currentl trying to generate button using html\markup
          >
          > <script type="text/javascript">
          > function init(){
          > var oSplitButton2 = new YAHOO.widget.Button("splitbutton2", { type:
          > "split", label: "Quote", menu: "splitbutton2select" });
          > }
          > YAHOO.util.Event.onDOMReady(init);
          > </script>
          > <input type="button" id="splitbutton2"
          > name="splitbutton2_button">
          > <select id="splitbutton2select" name="splitbutton2select">
          > <option value="Quote All">Quote All</option>
          >
          > </select>
          >
          > now once the button is rendered, i need to set one link on Quote (ie
          > on the main button itself) and then a different link for Quote All
          >
          > can anyone help me out please?
          >
          > TIA
          > thomas
          >
          >
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.