In a JSP page, I have a dropdown list. When the first element of the list is selected, I want a text area to show right on click. I\'m new to Javascript/Jquery, so I\'m obvi
Your function is correct, but js Element class have no show() and hide() methods. You can implement it using prototype. As an example
Element.prototype.hide(){
this.style.display = "hidden";
}
Element.prototype.show(style){
style = style ? style : "block";
this.style.display = style;
}
But better use jquery or something like this.