How can i make Labels on JSP invisible on demand

Hi All,I need to make the Labels on JSP page invisible based the diffrent selctions on the page. So is this possible to do in Java Script at client side by calling on change function. Please post a small code if possible.Thanks in advance for the answer.
[282 byte] By [sushruth04a] at [2007-11-26 17:57:28]
# 1
Hi Sushrut, I think this can be done with Javascript and not Java or JSP, you can check with an Ajax forum or DHTML forum for solutions.
appy77a at 2007-7-9 5:10:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Thanks Appy.
sushruth04a at 2007-7-9 5:10:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Well javascript, HTML and CSS are part of JSP solutions, so why wouldn't those questions be answered here?

The solution lies in either the "display" or "visibility" css properties of any html element.

display: can be "block" or "none". When you set it to none the element basically disappears entirely from the page. It will not even use up space anymore. This can make other elements surrounding it move a little, depending on your page layout.

visibility: "visible" or "hidden". When you hide an element it will vanish, but it will still use up space on the page, leaving an empty spot. This will keep other elements in their place.

You can change either property using javascript:

document.getElementById("yourelement").style.visibility = "hidden";

or

document.getElementById("yourelement").style.display = "none";

gimbal2a at 2007-7-9 5:10:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
Hi Gimbal,Thanks a lot....it worked fine.
sushruth04a at 2007-7-9 5:10:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

> Well javascript, HTML and CSS are part of JSP

> solutions, so why wouldn't those questions be

> answered here?

I don't know. I did answer a few CSS and HTML questions on this forum if you look in my thread answering history, you'll find a few threads.

I pointed the OP to check to DHTML and Ajax forums incase no one answers his questions here.

Also, because his question would help other in the DHTML and Ajax forums looking for answers to the same or similar questions.

The question is completely client-side computing involving Javascript, CSS and HTML , if it was supposed to be integrated with JSP elements then that's a different story.

So I answer on a case-by-case basis, my intent is not to harm anyone.

appy77a at 2007-7-9 5:10:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...