I have a basic script that disable and enables twp input text boxes. It works in Firefox and Netscape but on in Internet Explorer 6
I call the external script in the html head using:
<script type="text/javascript" src="./include/enable_disable.js"></script>
I call the function using the onclick using:
<div class="new">
<label for="new">New</label>
<input type="checkbox" name="enable_disable" value="new" id="new" onclick="codename()" />
</div>
so basically onclick will call the js function codename().
I know it must be a sytax issue that is needed in IE6 that is not needed for firefox or netscape but I have no idea.
newbie seeking help
javascript code
function codename()
{
if(document.appts.new.checked)
{
document.appts.req_f_name.disabled=false;
document.appts.req_l_name.disabled=false;
}
else
{
document.appts.req_f_name.disabled=true;
document.appts.req_l_name.disabled=true;
}
}
I call the external script in the html head using:
<script type="text/javascript" src="./include/enable_disable.js"></script>
I call the function using the onclick using:
<div class="new">
<label for="new">New</label>
<input type="checkbox" name="enable_disable" value="new" id="new" onclick="codename()" />
</div>
so basically onclick will call the js function codename().
I know it must be a sytax issue that is needed in IE6 that is not needed for firefox or netscape but I have no idea.
newbie seeking help
javascript code
function codename()
{
if(document.appts.new.checked)
{
document.appts.req_f_name.disabled=false;
document.appts.req_l_name.disabled=false;
}
else
{
document.appts.req_f_name.disabled=true;
document.appts.req_l_name.disabled=true;
}
}