Log in

View Full Version : disabling forms



T-B0N3
01-11-2007, 04:25 PM
Let's say I have the following code


<html>
<head>
</head>
<body>
<table>
<tr>
<td>
<SELECT>
<OPTION>Powerbuilder Developer
<OPTION>Database Administrator
<OPTION>Visual Basic Developer
<OPTION>Administration staff
<OPTION>Janitor
<OPTION>None of the above
</SELECT>
</td>
<td>
How do I condition that only one of the panes should be selected ?
<br>
If I select the first how do I de-select the others
</td>
<td>
<SELECT>
<OPTION>Powerbuilder Developer
<OPTION>Database Administrator
<OPTION>Visual Basic Developer
<OPTION>Administration staff
<OPTION>Janitor
<OPTION>None of the above
</SELECT>
</td>
</tr>
</table>
</body>
</html>

Among others this script might contain some other JavaScript.
My question is how do I condition that only pane should be selected ?
And in case both option 1 is selected and then option 2 is selected how do I deselect the 1st one ?

Thanks in advance !
Urgent ! :D

Kenny
01-11-2007, 04:31 PM
<html>
<head>
</head>
<body>
<form>
<SELECT onchange="document.forms[1].elements[0].disabled=true">
<OPTION>Powerbuilder Developer
<OPTION>Database Administrator
<OPTION>Visual Basic Developer
<OPTION>Administration staff
<OPTION>Janitor
<OPTION>None of the above
</SELECT>
</form>
<form><SELECT>
<OPTION>Powerbuilder Developer
<OPTION>Database Administrator
<OPTION>Visual Basic Developer
<OPTION>Administration staff
<OPTION>Janitor
<OPTION>None of the above
</SELECT>
</form>
</body>
</html>

T-B0N3
01-11-2007, 05:30 PM
thank you ! :D