選択タグの値が「NA」と等しいかどうかを確認する必要がある場合は、他の選択タグの値を別のものに変更するか、無効にする必要がありますか?
私はphpで作業しています。phpに方法があれば教えてください。お願いします
<html>
<center>
<title>Testing</title>
<head>
<script>
function closeWin()
{
alert('Posted');
window.open('', '_self', '');
window.close();
}
//Function to test value and change value
function value()
{
if (Question4DDL == 'NA')
{
Question5DDL == 'NA'
}
{
}
</script>
</head>
<form name="input" action="index.php" method="post" >
<body>
<div id="Questions">
<table>
<tr><td>
<div id="Q1">Subscribed to service provider?</div>
</td>
<td>
<select Name="Question1DDL">
<option value = 'BLANK'></option>
<option value = 'YES'>YES</option>
<option value ='NO'>NO</option>
</select>
</td>
</tr>
<tr>
<td>
<div id="Q2">Which provider are you currently with?</div>
</td>
<td>
<select Name="Question2DDL">
<option value = 'BLANK'></option>
<option>t1</option>
<option>t2</option>
<option>t3</option>
</select>
</td>
</tr>
<tr>
<td>
<div id="Q3">Type of dwelling/premisis?</div>
</td>
<td>
<select Name="Question3DDL">
<option value = 'BLANK'></option>
<option>CLUSTER</option>
<option>FLAT</option>
<option>PLOT</option>
<option>TOWNHOUSE</option>
<option>FARM</option>
</select>
</td>
</tr>
<tr>
<td>
<div id="Q4">Alarm in working order?</div>
</td>
<td>
//select tag in question.
<select Name="Question4DDL" onchange="value()">
<option value = 'BLANK'></option>
<option>YES</option>
<option>NO</option>
<option value = 'NA'>(N/A) - No Alarm</option>
</select>
</td>
</tr>
<tr>
<td>
<div id="Q5">Age of alarm?</div>
</td>
<td>
<select Name="Question5DDL">
<option value = 'BLANK'></option>
<option>-1</option>
<option>-3</option>
<option>+3</option>
</select>
</td>
</tr>
<tr>
<td>
<div id="Q6">Paying more than R350 per month?</div>
</td>
<td>
<select Name="Question6DDL"><option value = 'BLANK'></option>
<option>YES</option>
<option>NO</option>
</select>
</td>
</tr>
<tr>
<td>
<div id="Q7">Is the prospect in a known response area? (Have they seen sign boards in their area?)</div>
</td>
<td>
<select Name="Question7DDL">
<option value = 'BLANK'></option>
<option>YES</option>
<option>NO</option>
</select>
</td>
</tr>
<tr>
<td>
<div id="Q8">Request site visit from agent?</div>
</td>
<td>
<select Name="Question8DDL">
<option value = 'BLANK'></option>
<option>YES</option>
<option>NO</option>
</select>
</td>
</tr>
<tr>
<td>
</td>
<td>
<textarea name="comments" rows="5">
</textarea>
</td>
</tr>
<tr>
<td>
</td>
<td>
<input name="sb1" type="submit" value="Submit" onClick="closeWin()">
</td>
</tr>
</table>
</div>
</body>
</form>
</center>
</html>