"Quatney" <co************ *@sbcglobal.net > wrote in message
news:11******** *************@f 14g2000cwb.goog legroups.com...
Okay, I'm going nuts here. I know this is VERY easy and I shouldn't
have problems with this, but I can't seem to figure out what I want to
do.
I have a form, with two drop down boxes. I want to be able to disable
the second drop down box when a specific value is chosen on the first.
I can't seem to figure out how to do this.
Go easy on me, I'm a newbie for the most part, but here is my code.
function getQuestion(){
var qSelect = document.form1. QuestText.value
if (document.form1 .QuestText.valu e == "Other"
{
document.form1. Select2.disable d = true;
}
else
{
document.form1. Select2.disable d = false;
}
}
------- Beginning select statement from the first dropdown box
<SELECT name="QuestType " id="select1" tabindex="1" style="width:36 0px;"
required="Y" Description="Qu estion Type"
onchange="javas cript:getQuesti on()">
Any clues or suggestions?
<html>
<head>
<title>Untitled </title>
<script language="JavaS cript" type="text/javascript">
function getQuestion(){
if (document.form1 .QuestType1.val ue == "2")
{
document.form1. QuestType2.disa bled = true;
}
else
{
document.form1. QuestType2.disa bled = false;
}
}
</SCRIPT>
</head>
<body>
<form action="" name="form1" id="form1">
<select name="QuestType 1" id="QuestType1 " size="1" style="width:36 0px;"
tabindex="1" onChange="javas cript:getQuesti on()" required="Y"
Description="Qu estion Type">
<option value="1" SELECTED>1</option>
<option value="2">2</option>
<option value="3">3</option></select>
<select name="QuestType 2" id="QuestType2 " size="1" style="width:36 0px;"
tabindex="2" required="Y" Description="Qu estion Type">
<option value="1" SELECTED>1</option>
<option value="2">2</option>
<option value="3">3</option> </select>
</form>
</body>
</html>