SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    I want my 4th arrow! garlinto's Avatar
    Join Date
    Jun 2002
    Location
    Riding the electron wave
    Posts
    372
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    "[Object Window]" in parent browser

    I have created a pop-up form that a user can use to find info on some of our products. The pop-up form is done with php, but the pop-up window is created using a simple javascript.
    Code:
    <a href="javascript:window.open('foo.php', null, 'width=250,height=325')" alt="Foo">.....</a>
    After the pop-up is created, why does the parent window go blank with the words "[Object Window]". I want the parent to stay on the page that created the pop-up. I've researched it here but I can't seem to find any relevant threads. Thanks!
    Ducharme's Axiom: "If you view your problem closely
    enough, you will recognize yourself as part of the problem."


  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When the A element is clicked its default behavior is to load the value of the href attribute - assuming it is a URL. window.open returns a reference to a window object - this becomes the href value. Try this...
    Code:
    <a href='foo.php' onclick="window.open(this.href, null, 'width=250,height=325'); return false;" alt="Foo">.....</a>

  3. #3
    I want my 4th arrow! garlinto's Avatar
    Join Date
    Jun 2002
    Location
    Riding the electron wave
    Posts
    372
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a bunch, MikeFoster! That worked great.

    I didn't know that about the "<a>" element. Good bit of info to file away for next time.
    Ducharme's Axiom: "If you view your problem closely
    enough, you will recognize yourself as part of the problem."



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •