which menu field?? there is no field named "menu" there.... anyway, If I got it right you want to hide the <select> element... so here it goes...
Main Topics
Browse All TopicsI have a form When the check box field is checked I want the menu field to gray out or hide.
Bellow is a test form. Can you show me how this is done?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
That is basically the approach I would have taken but rather then do the document.getEle... in the actual onClick I woudl ahve called a funtion. That way you can write something like this:
function hidebox {
if (document.form1.parent[0].
document.getElementById('p
}
then in your onClick you call hidebox
That way you can also add code so that when the box is unchecked the other one comes back
You have multiple objects to deal with... as well as a tr/td.. we need to id the whole thing:
change the onclick to:
onclick="document.getEleme
On the table row th
<tr>
<td class="KT_th"><label for="parent..........
<tr id="parent_row_<?php echo $cnt1; ?>">
<td class="KT_th"><label for="parent..........
Here is another version (using Jquery)
I used your sample form.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html
<html xmlns="http://www.w3.org/1
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Simple Show Hide Project</title>
<script language="JavaScript" src="lib/jquery/jquery-1.3
</script>
</head>
<body>
<h1>New Web Project Page</h1>
<form id="form1" name="form1" method="post" action="">
<p>
<label>
<input type="checkbox" name="parent" id="parent"
onchange="if (this.checked) { $('#parent_sh').show()} else { $('#parent_sh').hide()}" />Is Parent</label>
</p>
<p id="parent_sh" style="display:none;">
<label>Select Parent:
<select name="parent_id" id="parent_id">
<option value="4">Marvel Comics</option>
<option value="3">DC Comics</option>
<option value="2">Lost</option>
<option value="1">Heros</option>
</select>
</label>
</p>
<p>
<label>Account Number:
<input type="text" name="name" id="name" />
</label>
</p>
<p>
<label>
<input type="submit" name="submit" id="submit" value="Submit" />
</label>
</p>
</form>
</body>
</html>
Business Accounts
Answer for Membership
by: kevin_uPosted on 2009-07-06 at 15:08:12ID: 24789642
I added an ID to the label and the onclick attribute.
Should be what you wanted.
Select allOpen in new window