By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,780 Members | 1,520 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,780 IT Pros & Developers. It's quick & easy.

"object expected" error in ie

P: n/a
i'm getting an "object expected" error in ie - not ff.

in the BODY onload attribute i call a function that's
loaded from an external file.

i've narrowed the error down to the fact it cannot find
this function.

<script src="external.js">

<body onload="func()">

func() is in external.js

works in other browsers - any help?
Mar 9 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
SAM
jman a écrit :
i've narrowed the error down to the fact it cannot find
this function.

<script src="external.js">

<body onload="func()">

func() is in external.js

works in other browsers - any help?
<script src="external.js" type="text/javascript"></script>

<body onload="func()">
certainly my Fx would do as your IE

--
sm
Mar 9 '08 #2

P: n/a
On Mar 9, 9:07 am, jman <erjdri...@gmail.comwrote:
i'm getting an "object expected" error in ie - not ff.

in the BODY onload attribute i call a function that's
loaded from an external file.

i've narrowed the error down to the fact it cannot find
this function.

<script src="external.js">

<body onload="func()">

func() is in external.js

works in other browsers - any help?
As SAM said, IE requires that you open and close the script tag. Try
doing this:
<script src="external.js" type="text/javascript"></script>
Mar 9 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.