[help] modify a label

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • little_shoe

    [help] modify a label

    hi all,
    I need to modify a label value into a form.

    I read about the "label" tag but it doesn't seem to have any value
    attribute.
    how can I do it using javascript?

    thanks...


    laura


  • Bruno Poupier

    #2
    Re: [help] modify a label

    "little_sho e" <little_shoe@em ail.it> a écrit dans le message de
    news:c7q71t$1bf i$1@newsreader2 .mclink.it...[color=blue]
    > hi all,
    > I need to modify a label value into a form.
    >
    > I read about the "label" tag but it doesn't seem to have any value
    > attribute.
    > how can I do it using javascript?[/color]

    Could you post a sample of your code here?


    Comment

    • Lasse Reichstein Nielsen

      #3
      Re: [help] modify a label

      "little_sho e" <little_shoe@em ail.it> writes:
      [color=blue]
      > I need to modify a label value into a form.
      >
      > I read about the "label" tag but it doesn't seem to have any value
      > attribute.
      > how can I do it using javascript?[/color]

      The label is a normal inline HTML element, like the <em> tag. The
      content of the label is the text inside. It is not an attribute.

      To change the content, you need a browser that allows dynamic update
      of the page content (where, e.g., Netscape 4 doesn't).

      How to modify the page is in the FAQ:
      <URL: http://jibbering.com/faq/#FAQ4_15 >
      although that uses the proprietary innerHTML property.


      /L
      --
      Lasse Reichstein Nielsen - lrn@hotpop.com
      DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
      'Faith without judgement merely degrades the spirit divine.'

      Comment

      • little_shoe

        #4
        Re: [help] modify a label

        My resolution:
        I have two different <label> labelA and labelB in the same position.
        When a specified event occures (ie.a checkbox is checked) my js function use
        the "hidden" attribute to display labelA or labelB according to the
        requirement...

        maybe is a poor solution, but it works...
        thanks for your suggestion

        laura


        Comment

        • Shawn Milo

          #5
          Re: [help] modify a label

          "little_sho e" <little_shoe@em ail.it> wrote in message news:<c7q71t$1b fi$1@newsreader 2.mclink.it>...[color=blue]
          > hi all,
          > I need to modify a label value into a form.
          >
          > I read about the "label" tag but it doesn't seem to have any value
          > attribute.
          > how can I do it using javascript?
          >
          > thanks...
          >
          >
          > laura[/color]

          Sounds like you could do what you want by using a
          span and the innerHTML value.

          In HTML:
          <span id="changeMe"> </span>

          In JS:
          document.getEle mentById('chang eMe').innerHTML = 'hello';



          Shawn

          Comment

          Working...