Results 1 to 2 of 2

Thread: Setting visibility of text field in JS

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Denmark
    Posts
    1,049

    Question Setting visibility of text field in JS

    I want to set the visibility of a text field from a function in JS. I have tried this, but the code is not valid. What could be wrong?
    [code]
    function test() {
    if (matval=="35") {
    document.navform.text1.style.visibility = hidden;
    } else {
    document.navform.text1.style.visibility = visible;
    }
    }

  2. #2
    Fanatic Member riis's Avatar
    Join Date
    Nov 2001
    Posts
    551
    Put quotes around the property values: "visible" and "hidden".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width