JavaScript.CoolDev.Com Support Forums

Any questions related to JavaScript menu and JavaScript tree menu by Javascript.CoolDev.Com

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

onLoad event problems

 
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsMenu
Author Message
flighty



Joined: 21 Jun 2003
Posts: 10

PostPosted: Sat Jun 21, 2003 3:13 pm    Post subject: onLoad event problems Reply with quote

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

PostPosted: Sat Jun 21, 2003 8:46 pm    Post subject: Reply with quote

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





PostPosted: Sun Jan 18, 2004 5:33 am    Post subject: Any solution on this Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsMenu All times are GMT
Page 1 of 1