Hi,
I have been searching all over the net on how to disable a form field via a javascript command. It seems pretty straight forward but for some reason I can't get it.
Here is what I have done based on my research so far:
Above the webpage's body.....
<cfoutput query="rsPamInformation">
<script language="javascript">
function enableField()
{
document.form1.upload_#rsPamInformation.PAM_ID#.disabled=false;
}
</script>
</cfoutput>
Checkbox in webpage's form...
<input name="checkbox" type="checkbox" value="checkbox" onclick="enableField()"/>
Here is the File Form do be disabled...
<input type="file" name="upload_#rsPamInformation.PAM_ID#" disabled="true"/>
The file form to be disabled is disabled when the webpage is loaded, but when I click on the checkbox nothing happens. So the disable="true" is working...meaning it's disabled, but I can't renable the file form via the checkbox...anyone see anything wrong?
Thanks again for all your help,
~Craig
I have been searching all over the net on how to disable a form field via a javascript command. It seems pretty straight forward but for some reason I can't get it.
Here is what I have done based on my research so far:
Above the webpage's body.....
<cfoutput query="rsPamInformation">
<script language="javascript">
function enableField()
{
document.form1.upload_#rsPamInformation.PAM_ID#.disabled=false;
}
</script>
</cfoutput>
Checkbox in webpage's form...
<input name="checkbox" type="checkbox" value="checkbox" onclick="enableField()"/>
Here is the File Form do be disabled...
<input type="file" name="upload_#rsPamInformation.PAM_ID#" disabled="true"/>
The file form to be disabled is disabled when the webpage is loaded, but when I click on the checkbox nothing happens. So the disable="true" is working...meaning it's disabled, but I can't renable the file form via the checkbox...anyone see anything wrong?
Thanks again for all your help,
~Craig