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

Why does ie give me an 'object expected' error when I use the function?

P: 5
I am using the function to open a music player from my website. It works perfectly in firefox and chrome but ie is giving me an 'object expected' error.

Here's my code, and you can access it at

<SCRIPT language="JavaScript1.2">
function openwindow1()

<a href="javascript: openwindow1()">
<img src="images/photos/triparoundtheworld.gif"/>

Any help would be greatly appreciated.

Dec 27 '10 #1
Share this Question
Share on Google+
3 Replies

P: 170
I did some testing on my machine, and the reason is because of the <object> tag.

Any reason you're using this in the first place? It's not a widely supported element, and typically only works in IE. At any rate, your structuring of the element is incorrect.

Check out this site: ->here<-

I'd remove the <object> tags all together. You shouldn't notice any difference at all.
Dec 27 '10 #2

P: 5
Thanks so much. I took the object tag out and now it works in ie.

Dec 27 '10 #3

P: 170
Perfect. Glad this helped you out.

Please be sure to choose the answer that helped you solve your problem.
Dec 27 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.