"Quatney" <co*************@sbcglobal.net> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.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.value == "Other"
{
document.form1.Select2.disabled = true;
}
else
{
document.form1.Select2.disabled = false;
}
}
------- Beginning select statement from the first dropdown box
<SELECT name="QuestType" id="select1" tabindex="1" style="width:360px;"
required="Y" Description="Question Type"
onchange="javascript:getQuestion()">
Any clues or suggestions?
<html>
<head>
<title>Untitled</title>
<script language="JavaScript" type="text/javascript">
function getQuestion(){
if (document.form1.QuestType1.value == "2")
{
document.form1.QuestType2.disabled = true;
}
else
{
document.form1.QuestType2.disabled = false;
}
}
</SCRIPT>
</head>
<body>
<form action="" name="form1" id="form1">
<select name="QuestType1" id="QuestType1" size="1" style="width:360px;"
tabindex="1" onChange="javascript
:getQuestion()" required="Y"
Description="Question Type">
<option value="1" SELECTED>1</option>
<option value="2">2</option>
<option value="3">3</option></select>
<select name="QuestType2" id="QuestType2" size="1" style="width:360px;"
tabindex="2" required="Y" Description="Question Type">
<option value="1" SELECTED>1</option>
<option value="2">2</option>
<option value="3">3</option> </select>
</form>
</body>
</html>