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

setting button width

Expand Messages
  • Rodrigue Lagoue Njinthe
    hi! i m trying to set a button s widt programmatically. I use the following method. YAHOO.util.Dom.setStyle( buttonId , width , 175 + px ); It seems like the
    Message 1 of 4 , Aug 1, 2008
    • 0 Attachment

      hi!

       

      i'm trying to set a button's widt programmatically. I use the following method. YAHOO.util.Dom.setStyle('buttonId', 'width', 175 + 'px'); It seems like the call of this method extends the existing button's width. That means if the button had a width of 30px before the call, it has a width of 30px + 175px after.

       

      What could be the problem

       

      thanks for any help

    • Frank Dietrich
      try setting YAHOO.util.Dom.setStyle( buttonId , width , (175) + px ); or if You have a known value use 175px directly *********** REPLY SEPARATOR
      Message 2 of 4 , Aug 1, 2008
      • 0 Attachment
        try setting
         
        YAHOO.util.Dom.setStyle('buttonId', 'width', (175) + 'px');
         
        or if You have a known value use '175px' directly

        *********** REPLY SEPARATOR ***********

        On 01.08.08 at 10:59 Rodrigue Lagoue Njinthe wrote:

        hi!

         

        i'm trying to set a button's widt programmatically. I use the following method. YAHOO It seems like the call of this method extends the existing button's width. That means if the button had a width of 30px before the call, it has a width of 30px + 175px after.

         

        What could be the problem

         

        thanks for any help

      • Rodrigue Lagoue Njinthe
        Hi Frank, thanks for your answer. It is the use of the setStyle function that had the behaviour i described in my first mail. I cannot set it directly,
        Message 3 of 4 , Aug 1, 2008
        • 0 Attachment

          Hi Frank,

           

          thanks for your answer.  It is the use of the setStyle function that had the behaviour i described in my first mail. I cannot set it directly, because this may change dynamically at runtime.

           

          Thanks for any help

           

          From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of Frank Dietrich
          Sent: Freitag, 1. August 2008 12:57
          To: ydn-javascript@yahoogroups.com
          Subject: Re: [ydn-javascript] setting button width

           

          try setting

           

          YAHOO.util.Dom.setStyle('buttonId', 'width', (175) + 'px');

           

          or if You have a known value use '175px' directly


          *********** REPLY SEPARATOR ***********

          On 01.08.08 at 10:59 Rodrigue Lagoue Njinthe wrote:

          hi!

           

          i'm trying to set a button's widt programmatically. I use the following method. YAHOO It seems like the call of this method extends the existing button's width. That means if the button had a width of 30px before the call, it has a width of 30px + 175px after.

           

          What could be the problem

           

          thanks for any help

        • Frank Dietrich
          Sure, normally You get there with a variable comming from somewhere but var nNewWidth = 175; ..... ..... YAHOO.util.Dom.setStyle( buttonId , width ,
          Message 4 of 4 , Aug 1, 2008
          • 0 Attachment
             
            Sure, normally You get there with a variable comming from somewhere
             
            but
             
            var nNewWidth = 175;
            ...
            ...
            YAHOO.util.Dom.setStyle('buttonId', 'width', (nNewWidth) + 'px');
             
            should work
             
             
             
             

            *********** REPLY SEPARATOR ***********

            On 01.08.08 at 13:57 Rodrigue Lagoue Njinthe wrote:

            Hi Frank,

             

            thanks for your answer.  It is the use of the setStyle function that had the behaviour i described in my first mail. I cannot set it directly, because this may change dynamically at runtime.

             

            Thanks for any help

             

            From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of Frank Dietrich
            Sent: Freitag, 1. August 2008 12:57
            To: ydn-javascript@yahoogroups.com
            Subject: Re: [ydn-javascript] setting button width

             

            try setting

             

            YAHOO.util.Dom.setStyle('buttonId', 'width', (175) + 'px');

             

            or if You have a known value use '175px' directly


            *********** REPLY SEPARATOR ***********

            On 01.08.08 at 10:59 Rodrigue Lagoue Njinthe wrote:

            hi!

             

            i'm trying to set a button's widt programmatically. I use the following method. YAHOO It seems like the call of this method extends the existing button's width. That means if the button had a width of 30px before the call, it has a width of 30px + 175px after.

             

            What could be the problem

             

            thanks for any help

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