L
Lukelrc
Hi,
I have an ASP page in which are two textfields. What i want is these
to be disabeled if a checkbox is ticked in the previous page. However
it doesnt work.
This is what i have:
<script type="text/javascript">
function disableischecked()
var ischecked = "<%=request("chkall")%>"
if (ischecked = "on")
{
document.fmChoice.cboPickYear.disabled=true;
document.fmChoice.cboPickMonth.disabled=true;
alert("it works!")
}
</script>
</head>
<body onload ="disableischecked()">
<form action="Edit.asp" method="get" name="fmChoice" id="fmChoice">
<select name="cboPickYear" id="cboPickYear" size="2"
style="width:100px;" onChange="submit()></select>
<select name="cboPickMonth" size = "2" style="width:100px;"
id="cboPickMonth" onChange="submit()"></select>
.........
If i take out:
var ischecked = "<%=request("chkall")%>"
if (ischecked = "on")
from the disableischecked()function it will disable the textboxes and
the message will pop up, but i need it to be conditional on wheather
chkall = "on".
Any help would be much appreciated!
I have an ASP page in which are two textfields. What i want is these
to be disabeled if a checkbox is ticked in the previous page. However
it doesnt work.
This is what i have:
<script type="text/javascript">
function disableischecked()
var ischecked = "<%=request("chkall")%>"
if (ischecked = "on")
{
document.fmChoice.cboPickYear.disabled=true;
document.fmChoice.cboPickMonth.disabled=true;
alert("it works!")
}
</script>
</head>
<body onload ="disableischecked()">
<form action="Edit.asp" method="get" name="fmChoice" id="fmChoice">
<select name="cboPickYear" id="cboPickYear" size="2"
style="width:100px;" onChange="submit()></select>
<select name="cboPickMonth" size = "2" style="width:100px;"
id="cboPickMonth" onChange="submit()"></select>
.........
If i take out:
var ischecked = "<%=request("chkall")%>"
if (ischecked = "on")
from the disableischecked()function it will disable the textboxes and
the message will pop up, but i need it to be conditional on wheather
chkall = "on".
Any help would be much appreciated!