Connecting Tech Pros Worldwide Help | Site Map

"object expected" error in ie

  #1  
Old March 9th, 2008, 03:15 PM
jman
Guest
 
Posts: 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?
  #2  
Old March 9th, 2008, 04:05 PM
SAM
Guest
 
Posts: n/a

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
  #3  
Old March 9th, 2008, 05:25 PM
endangeredmassa@gmail.com
Guest
 
Posts: n/a

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 Threads
Thread Thread Starter Forum Replies Last Post
"Object Expected" error in IE, but no error in Firefox or Opera Steve Chapel answers 16 October 9th, 2006 04:15 AM