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

Re: [ydn-javascript] Adding id to a yui button

Expand Messages
  • Todd Kloots
    If you want to apply an id to the actual element, then you will need to utilize the DOM to access that node inside the Button instance s root element:
    Message 1 of 2 , Apr 1, 2008
    • 0 Attachment
      If you want to apply an id to the actual <button> element, then you will
      need to utilize the DOM to access that node inside the Button instance's
      root element:

      oButton.get("element").firstChild.firstChild.id = "my-button-id";

      - Todd

      royals87 wrote:
      >
      > This may be simple, but how do i make a button id appear in the html
      > source after page load.
      >
      > If i type an id, it does not get copied over but rather gets generated
      > like this:
      >
      > <span id="personalNextContainer" class="yuibutton yui-button
      > yui-push-button">
      > <span class="first-child">
      > <button type="button" tabindex="0">Next</button>
      > </span>
      > </span>
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.