Jump to content


This topic is now archived and is closed to further replies.


Firefox & Opera dig it; IE doesn't

Recommended Posts

Why does IE suck? Save that one for another thread.

Using JavaScript to disable and enable a textarea based upon a drop down selection. All options, but the last one, in the selection box are set to disable the textarea. The text area is set to disabled by default.

All entered text and the drop down selection are to be saved to a database.

Here's the source:

<form method="POST" action="dataincourse.php" name="form1">

function enable6(){
if (document.all || document.getElementById){
if (document.form1.test6.disabled==true)
function disable6(){
if (document.all || document.getElementById){
if (document.form1.test6.disabled==true)
<!--how often will the course be taught--><br><font color="#FFFFFF"><a name="offer"></a>
<b>10.</b> How often will the course be taught? </font>
<select size="1"  name="dropdown" style="background-color: lightyellow">
<option name="dairy" value="Please Choose One" onclick="disable6()">Please Choose One</option>
<option name="protein" value="On a regular basis - Probably Annually" onclick="disable6()">On a regular basis - Probably Annually</option>
<option name="protein" value="On a regular basis - Probably Biennually" onclick="disable6()">On a regular basis - Probably Biennually</option>
<option name="protein" value="One time only" onclick="disable6()">One time only</option>
<option name="protein" value="Other - Please specify" onclick="enable6()">Other - Please specify</option></select>
<!--<select style='background-color: lightyellow' name="Offered">
    <option value="Please Choose One">Please Choose One</option>
    <option value="On a regular basis - Probably annually">On a regular basis - Probably annually</option>
    <option value="On a regular basis - Probably biennually">On a regular basis - Probably biennually</option>
    <option value="One time only">One time only</option>
    <option value="Other - Please specifiy">Other - Please specifiy</option>
<br><font color="#FFFFFF"><b>Other specification: </b></font>
<textarea id="test6" type="text" style="background-color: lightyellow" name="OtherOffered" cols="58" maxlength="500" disabled></textarea>

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.