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:
  onCheck of Check Box some buttons will enable  kshitiz at 13:14 on Monday, June 21, 2004
 

In this code i want to enable the add button when checkbox is selected & deselect the same when unselected.

Its functioning one way but not other way .PS suggest some thing
My Code:
<html>
<head>
<script language="javascript">

function enableAdd(){
alert(document.forms[0].C1);
var obj=document.forms[0].C1.value;
if(obj=='ON'){
document.my.b1.disabled=false;
}
else {
document.my.b1.disabled=true;
}
}
</script>
</head>

<body >
<form name="my" >
<INPUT TYPE="submit" name="b1" value="Add" disabled><br>
<INPUT TYPE="submit" name="b2" value="Delete">
<input type="checkbox" name="C1" value="ON" onClick="enableAdd()">
</form>
</body>
</html>







CodeToad Experts

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








Recent Forum Threads
•  Print directly to a printer without export to PDF file
•  How to avoid and detect memory leaks
•  Re: Calling ASP from Stored procedure
•  Re: Date problem!! SQL query - Access DB - ASP VBScript
•  Grid
•  ASP Form Date Field to send to DB
•  Response.Write Problems
•  javascript onClick() event problem in asp.net
•  Re: ASP Email System Source Code


Recent Articles
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)
Function to Return Alpha Characters Only
The OSI Reference Model - A Clear and Concise Illustration !
Understanding Pointers to Functions in C
Application & Session Events in the Global.asax File
Socket Programming in Perl


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2004