Jump to content


Firefox & Opera dig it; IE doesn't

  • Please log in to reply
No replies to this topic

#1 h8ids

  • Members
  • Pip
  • Newbie
  • 5 posts

Posted 22 February 2006 - 05:04 PM

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>

"Macromedia Flash will never be anything more than a cartoon creation tool." - Someone I know.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users