Meaningless Drivel is fun!*
The moose likes HTML, CSS and JavaScript and the fly likes Show a hidden text field Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Show a hidden text field" Watch "Show a hidden text field" New topic

Show a hidden text field

Mike Yu
Ranch Hand

Joined: Nov 17, 2001
Posts: 175
Hi there,
If I have a select drop down list and a hidden text field. I want the hidden field to show as a text field when I select option2 in the select box, for example:
<form name="form1">
<select name ="select1">
<option value="1" selected> option1
<option value="2"> option2
<option value="3"> option3
<input type ="hidden" name="input1">
Can someone show me how to do it?

Thanks,<br />Mike
Charlie Sturman
Ranch Hand

Joined: Apr 04, 2002
Posts: 112
Mike Yu
Ranch Hand

Joined: Nov 17, 2001
Posts: 175
Hi Charlie,
Thank you for your help. Your code works very well.
I agree. Here's the link:
subject: Show a hidden text field
Similar Threads
dropdown filter
Javascript Dynamic Dropdown Box validation
Select tag 's selection should persist.
Show the selected value in dropdown again
How to determine which button/menu cause a submit