Why does ie give me an 'object expected' error when I use the window.open() function?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brad atefi
    New Member
    • Dec 2010
    • 5

    Why does ie give me an 'object expected' error when I use the window.open() function?

    I am using the window.open() 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
    www.oceanmanmus ic.com/audio.html

    <SCRIPT language="JavaS cript1.2">
    function openwindow1()
    {
    window.open("tr iparoundtheworl d.html","mywind ow",
    "menubar=1,resi zable=1,width=3 33,height=333") ;
    }
    </SCRIPT>

    <a href="javascrip t: openwindow1()">
    <img src="images/photos/triparoundthewo rld.gif"/>
    </a>

    Any help would be greatly appreciated.

    Best,
    Brad
  • AutumnsDecay
    New Member
    • Mar 2008
    • 170

    #2
    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.

    Comment

    • brad atefi
      New Member
      • Dec 2010
      • 5

      #3
      Thanks so much. I took the object tag out and now it works in ie.

      Best,
      Brad

      Comment

      • AutumnsDecay
        New Member
        • Mar 2008
        • 170

        #4
        Perfect. Glad this helped you out.

        Please be sure to choose the answer that helped you solve your problem.

        Comment

        Working...