Connecting Tech Pros Worldwide Help | Site Map

"object expected" error in ie

 
LinkBack Thread Tools Search this Thread
  #1  
Old March 9th, 2008, 02:15 PM
jman
Guest
 
Posts: n/a
Default "object expected" error in ie

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, 03:05 PM
SAM
Guest
 
Posts: n/a
Default 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, 04:25 PM
endangeredmassa@gmail.com
Guest
 
Posts: n/a
Default 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>
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.