Hi
I know I will probably see the problem as soon as I finish posting, but I can’t find the problem in this bit of simple script right now!
This works in FF but not in IE7.
Click on the first check box, it should enable/disable the button.
The second one works.
[code=html]<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
<script type=”text/javascript”>
function show(a,b){
var aa=document.getElementById(a);
var bb=document.getElementById(b);
if (aa.checked==true){
bb.disabled=false;
} else {
bb.disabled=true;
}
}
</script>
</head>
<body>
<div>
<form name=”modifyhouse1″ action=”modifylisting.php” method=”post”>
<input type=”submit” id=”modifyhouse1″ value=”modify listing info” disabled=”disabled” /><br />
<input type=”checkbox” id=”modhcb1″ onclick=”show(this.id,’modifyhouse1′);” /><small>Check to be sure</small>
</form>
</div>
<div>
<form name=”modifyhouse” action=”modifylistingpics.php” method=”post”>
<input type=”submit” id=”modifyhousepics1″ value=”modify listing pics” disabled=”disabled”><br />
<input type=”checkbox” id=”modhpcb1″ onClick=”show(this.id,’modifyhousepics1′);”><small>Check to be sure</small>
</form>
</div>
</body>
</html>
Thanks.