Text label is not disabling in Firefox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • honey99
    New Member
    • Jul 2007
    • 46

    Text label is not disabling in Firefox

    Hi!
    i have a problem in firefox.I have a textbox with a laeb for it and a checkbox.i need to disable the textbox as well as label when checkbox is checked.it is working in IE but not in FF.plz check my code and tell me a solution

    [CODE=html]<td id='abc' name="xyz">
    Text
    </td>
    <Input type="text" readonly name="abc1" style="width:16 5px;" size = "20" >[/CODE]

    in javascript my code is

    [CODE=javascript]if(document.frm .self.checked== true)
    {
    document.ex.abc .disabled=true; (ex is the HTML form name)
    }
    else
    {
    document.ex.abc .disabled=true;
    }[/CODE]
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Is the text input box not "abc1"?

    Comment

    • pbmods
      Recognized Expert Expert
      • Apr 2007
      • 5821

      #3
      Heya, Honey99.

      Thanks for using CODE tags! Did you know that you can specify a language for your CODE tags to make your source code easier to read (and therefore make our Experts more likely to post solutions)?

      You will still need to use [/CODE] to close your code blocks, regardless of the language, but you can the use one of these tags to open your code block:

      [CODE=html]
      [CODE=javascript]
      [CODE=php]

      and so on.

      Thanks!

      MODERATOR

      Comment

      Working...