Sujay,
Did you ever get this to work? I tried but could never get the value assigned before the form posted. The end result was always a "No Result Given" on the Form Thank You page. I tried a bunch of different JS events but couldn't find one that applied.
Thanks,
Joe.
I found the problem with your form, you should uncheck the disable user input checkbox,
but then user will be able to input value there so to avoid that you need do these steps.
Hi Anne,
I found the problem with your form, you should uncheck the disable user input checkbox,
but then user will be able to input value there so to avoid that you need do these steps.
1)note all the textboxes for which input should be disabled, like txt12 etc
add this code at the end for all the textboxes
txt12.disabled=true;
so on for all textboxes
2)Now register the onbeforeunload event with this code
document.body.onbeforeunload=BeforeUnload;
3)Now before the form is posted enable the textboxes again before submit
function BeforeUnload(){txt12.disabled=false;}
so on for all textboxes