codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  need to enable a text area when the dropdown menus value is more than 0  ammweb at 18:41 on Wednesday, December 02, 2009
 

I am trying to get a script to disable the textarea when loaded as the dropdown value is set to 0, but once the viewer select a qty of more than 0, I want the textarea to be enabled. I have it working in Mozilla but not in IE. Any suggestions on how to get it to work in IE?

code below:

<script language="javascript">
function disableSENDN059()
{
document.getElementById("SENDN059").disabled = true;
}
function enableSENDN059()
{
document.getElementById("SENDN059").disabled = false;
}
</script>

<script language="javascript">
function disableSENDN061()
{
document.getElementById("SENDN061").disabled = true;
}
function enableSENDN061()
{
document.getElementById("SENDN061").disabled = false;
}
</script>
</head>

<body>
<form name="myForm" method="post" action="https://www.amm.org/submissions/individual/1confirm.asp?emlcode=<%= MAILCODE %>">
<table>
<tr>
<td>
<select name="N059MEDAL" id="N059MEDAL">
<option value="0" onClick="disableSENDN059()">0</option>
<option value="1" onClick="enableSENDN059()">1</option>
<option value="2" onClick="enableSENDN059()">2</option>
<option value="3" onClick="enableSENDN059()">3</option>
<option value="4" onClick="enableSENDN059()">4</option>
<option value="5" onClick="enableSENDN059()">5</option>
</select>
</td>
<P>
<td colspan="4">
<select name="N061MEDAL" id="N061MEDAL">
<option value="0" onClick="disableSENDN061()">0</option>
<option value="1" onClick="enableSENDN061()">1</option>
<option value="2" onClick="enableSENDN061()">2</option>
<option value="3" onClick="enableSENDN061()">3</option>
<option value="4" onClick="enableSENDN061()">4</option>
<option value="5" onClick="enableSENDN061()">5</option>
</select>
</td></P></tr></table>

<P>
<table>
<tr>
<td>
<label>
<% If N059MEDAL = 0 THEN %>
<textarea name="SENDN059" cols="25" rows="3" id="SENDN059" disabled="disabledSENDN059"> </textarea>
<% end if %>
</label> </td>

<td bgcolor="#F5F0DD">
<label>

<% If N061MEDAL = 0 THEN %>
<textarea name="SENDN061" cols="25" rows="3" id="SENDN061" disabled="disabledSENDN061"> </textarea>
<% end if %>
</label> </td></tr></table> </P></form>

</body>
</html>


  Re: need to enable a text area when the dropdown menus value is more than 0  amery buck at 10:54 on Wednesday, March 31, 2010
 

Nice post about dropdown menus value. I like your blog very much because it has very interesting articles of different topics like testking 640-801, testking 640-802 and testking 640-816 and their tips and tricks. I am a very big googler and search on different topics. Between searching i found your nice blog. Thanks for your this great blog.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  FREE dating software worth over $350 for free
•  running a command in remote machine by using perl
•  converting JAVA code to JSP
•  image and form fieild upload problem
•  Multiplying currency
•  Java Garbage Collection Boot Camp
•  validations fo form fields
•  Setting page size at which scroll bars appear in browser window (javascript)
•  before executing a function


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010