Welcome, Guest. Please login or register.

Author Topic: Need help with a Javascript to hide form items.  (Read 2957 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: Need help with a Javascript to hide form items.
« on: May 01, 2007, 07:37:48 PM »
Try setting e.style.display="none" / "" (where e is the form element object handle) to hide an element at the JS/CSS1 level. You can also use e.style.visibility="hidden" / "visible" where CSS2 is available.

Better still, wrap the form element in a
or a and modify the style.display / .visibility property of that.

@Motorollin

Strictly speaking, any element that can take a style attribute can be made visible or invisible by modifying the element's style property itself, rather than the element, which as you say, is unlikely to have a visibility property of its own.
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: Need help with a Javascript to hide form items.
« Reply #1 on: May 01, 2007, 07:50:49 PM »
:lol:
int p; // A