Connecting Tech Pros Worldwide Forums | Help | Site Map

"object expected" error in ie

jman
Guest
 
Posts: n/a
#1: Mar 9 '08
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?

SAM
Guest
 
Posts: n/a
#2: Mar 9 '08

re: "object expected" error in ie


jman a écrit :
Quote:
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
endangeredmassa@gmail.com
Guest
 
Posts: n/a
#3: Mar 9 '08

re: "object expected" error in ie


On Mar 9, 9:07 am, jman <erjdri...@gmail.comwrote:
Quote:
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>
Closed Thread


Similar JavaScript / Ajax / DHTML bytes