D
Dani
Hello everybody,
I have some code that disables form elements on body load, but I notice
when I hit the "back" button, I need to re-enable the form elements
(that is done by clicking on a radial button). Is there any way I can
keep the form for disabling every time a user hits the back button and
"remember" what elements should be enabled? I was thinking maybe
utilizing some referrer thing, but I'm not that good with JS yet.
Thanks for your help!
here is a snip-it from the code:
<script language="JavaScript">
function Disable_All()
{
document.frmPost.employeename.className="disabled";
document.frmPost.employeename.disabled = true
document.frmPost.copyfromemployee.className="disabled";
document.frmPost.copyfromemployee.disabled = true
document.frmPost.effdate.className="disabled";
document.frmPost.effdate.disabled = true
document.frmPost.branch.className="disabled";
document.frmPost.branch.disabled = true
document.frmPost.jobtitle.className="disabled";
document.frmPost.jobtitle.disabled = true
document.frmPost.defprinter.className="disabled";
document.frmPost.defprinter.disabled = true
document.frmPost.printerdesc.className="disabled";
document.frmPost.printerdesc.disabled = true
document.frmPost.extraservice.className="disabled";
document.frmPost.extraservice.disabled = true
document.frmPost.assistance.className="disabled";
document.frmPost.assistance.disabled = true
for (var i = 0;i<8;i++){
document.frmPost.elements.hwreqested.disabled = true;
}
for (var i = 0;i<5;i++){
document.frmPost.elements.swrequested.disabled = true;
}
}
</Script>
<body onLoad="Disable_All();">
I have some code that disables form elements on body load, but I notice
when I hit the "back" button, I need to re-enable the form elements
(that is done by clicking on a radial button). Is there any way I can
keep the form for disabling every time a user hits the back button and
"remember" what elements should be enabled? I was thinking maybe
utilizing some referrer thing, but I'm not that good with JS yet.
Thanks for your help!
here is a snip-it from the code:
<script language="JavaScript">
function Disable_All()
{
document.frmPost.employeename.className="disabled";
document.frmPost.employeename.disabled = true
document.frmPost.copyfromemployee.className="disabled";
document.frmPost.copyfromemployee.disabled = true
document.frmPost.effdate.className="disabled";
document.frmPost.effdate.disabled = true
document.frmPost.branch.className="disabled";
document.frmPost.branch.disabled = true
document.frmPost.jobtitle.className="disabled";
document.frmPost.jobtitle.disabled = true
document.frmPost.defprinter.className="disabled";
document.frmPost.defprinter.disabled = true
document.frmPost.printerdesc.className="disabled";
document.frmPost.printerdesc.disabled = true
document.frmPost.extraservice.className="disabled";
document.frmPost.extraservice.disabled = true
document.frmPost.assistance.className="disabled";
document.frmPost.assistance.disabled = true
for (var i = 0;i<8;i++){
document.frmPost.elements.hwreqested.disabled = true;
}
for (var i = 0;i<5;i++){
document.frmPost.elements.swrequested.disabled = true;
}
}
</Script>
<body onLoad="Disable_All();">