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

Re: [ydn-javascript] yui selector + submit button

Expand Messages
  • Satyam
    Selector.query returns an array, even if it only contains one element. Try: YAHOO.util.Selector.query( input[type=submit] )[0].disabled = true or you can set
    Message 1 of 2 , Jan 1, 2008
    • 0 Attachment
      Selector.query returns an array, even if it only contains one element. Try:

      YAHOO.util.Selector.query('input[type=submit]')[0].disabled = true

      or you can set the third argument to true so that ir returns only the first
      element it finds (it should be faster) or use Dom.batch:

      http://developer.yahoo.com/yui/docs/YAHOO.util.Dom.html#batch

      if there actually is more than one.

      Satyam


      ----- Original Message -----
      From: "ragtek_ragga" <ragtek_ragga@...>
      To: <ydn-javascript@yahoogroups.com>
      Sent: Tuesday, January 01, 2008 7:32 PM
      Subject: [ydn-javascript] yui selector + submit button


      > hi
      > on http://ragtek.org/vb37/register.php?do=register i'm trying to
      > disable the submit button with
      > YAHOO.util.Selector.query('input[type=submit]').disabled = true; but
      > it isn't working
      >
      > any idee why this is so?
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      > --
      > No virus found in this incoming message.
      > Checked by AVG Free Edition.
      > Version: 7.5.516 / Virus Database: 269.17.13/1205 - Release Date:
      > 31/12/2007 15:32
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.