If I do . . .
myForm=document .tstForm;
function initialSetup(){
myForm.fld01.va lue="Test 01"
myForm.fld02.va lue="Test 02";
myForm.fld01.fo cus();
}
Then, in the body tag, I do onLoad="initial Setup()",
the script doesn't work and I get a "myForm has no properties" error
I know it'll work if I move it within the function, but I figured a
global variable would retain its value within the function. Why not?
myForm=document .tstForm;
function initialSetup(){
myForm.fld01.va lue="Test 01"
myForm.fld02.va lue="Test 02";
myForm.fld01.fo cus();
}
Then, in the body tag, I do onLoad="initial Setup()",
the script doesn't work and I get a "myForm has no properties" error
I know it'll work if I move it within the function, but I figured a
global variable would retain its value within the function. Why not?
Comment