1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to Open a link on a parent window?

Discussion in 'HTML & Website Design' started by ma0, Aug 20, 2007.

  1. #1
    I open a small popup window with some javascript. On the small popup window I have a couple of link and I want that those link will open a new page on the parent window (the window with the javascript). How can I do that? TARGET=.. need a window name, but I don't know how to assign a name to the first window.

    Thanks
    SEMrush
     
    ma0, Aug 20, 2007 IP
    SEMrush
  2. vasildb

    vasildb Active Member

    Messages:
    845
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    68
    #2
    I think that is _blank.
     
    vasildb, Aug 20, 2007 IP
  3. ma0

    ma0 Peon

    Messages:
    218
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    no. Target="_blank" opens a new window.
    I need it on the old one.
    Thanks for the effort :)
     
    ma0, Aug 20, 2007 IP
  4. vasildb

    vasildb Active Member

    Messages:
    845
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    68
    #4
    Huh try _top and none.
     
    vasildb, Aug 20, 2007 IP
  5. ma0

    ma0 Peon

    Messages:
    218
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Nope. None of them will do the trick. They both open a new window/tab.

    Maybe the problem lies in the fact that I opened this window with javascript
     
    ma0, Aug 20, 2007 IP
  6. twistedspikes

    twistedspikes Notable Member

    Messages:
    5,694
    Likes Received:
    293
    Best Answers:
    0
    Trophy Points:
    230
    #6
    target="_parent"
     
    twistedspikes, Aug 20, 2007 IP
  7. ma0

    ma0 Peon

    Messages:
    218
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #7
    unfortunately _parent doesn't work. As I said before, I think the problem is that I opened the popup with javascript's window.open()
    :(
     
    ma0, Aug 20, 2007 IP
  8. twistedspikes

    twistedspikes Notable Member

    Messages:
    5,694
    Likes Received:
    293
    Best Answers:
    0
    Trophy Points:
    230
    #8
    hmm maybe.

    Unless theres a way to name the window you open in javascript then I have no idea.
     
    twistedspikes, Aug 20, 2007 IP
  9. timajus

    timajus Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    to refer to the parent window you can use.

    window.opener

    and to change the page on the parent you can do

    window.opener.location.href='newpage.htm'

    hope this helps,
    bye
     
    timajus, Aug 20, 2007 IP
  10. ma0

    ma0 Peon

    Messages:
    218
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Thanks, that's what I needed!
     
    ma0, Aug 20, 2007 IP