| Author |
Message |
flighty
Joined: 21 Jun 2003 Posts: 10
|
Posted: Sat Jun 21, 2003 3:13 pm Post subject: onLoad event problems |
|
|
I use this code at the top of most of my pages:
<body onLoad="document.forms.MyForm.MyField.selectedIndex=1"... >
...but I am finding that I get JS errors since adding COOLjsMenuPro to the page.
Specifically, I get this error:
"A run time error has occured. Do you wish to debug?
document.forms.MyForm.MyField is null or not an object."
Can anyone explain why this happens and how I get round it?
Thanks
Jeremy |
|
| Back to top |
|
 |
AlexKunin Developer
Joined: 03 Jan 2003 Posts: 1191
|
Posted: Sat Jun 21, 2003 8:46 pm Post subject: |
|
|
| I've tried your code under IE6 with COOLjsMenu PRO, and there were no problems. What browser do you use? Can you send your page to jssupport@cooldev.com? |
|
| Back to top |
|
 |
Donzella Guest
|
Posted: Sun Jan 18, 2004 5:33 am Post subject: Any solution on this |
|
|
| I am trying to use the onload event and am also having trouble with COOLjsMenuPRO. I get the same sort of errors. I am simply trying document.loginForm.strUserName.focus() which works, meaning the text box receives focus, but I get two errors during page load. If I remove the onload then there are no errors. I am using IE 6. |
|
| Back to top |
|
 |
|