question about pop-up windows

Discussion in 'Fan Sites' started by Grimby, Jan 2, 2004.

Thread Status:
Not open for further replies.
  1. Grimby Technical Consultant

    Administrator
    Member Since:
    Apr 22, 2000
    star 7
    there are a few instances on my web site where i want links to open into their own windows - one is for viewing a full sized image and the other for opening a tiny help window.

    my question is will these windows still open on machines that are using pop-up blockers? i'm not really sure how those things work.

    i guess the way i plan on doing it is using the target="_blank" attribute inside the <a> tag, unless there's a better way i haven't found yet.
  2. dark42 Jedi Knight

    Member Since:
    May 16, 2002
    star 3
    Links won't be blocked by pop-up blockers, only things inside scripts that open new windows. At least, that's what *should* happen.
  3. Dingo Force Ghost

    Member Since:
    Apr 23, 2001
    star 5
    dark42 is correct, as long as it's a hyperlink, then pop-ups will appear, as blockers only work against windows automatically opened through scripting. I can vouch for it as I've got one of the better blockers, and it's never had a problem when I've used the target="_blank" line in links.
  4. Grimby Technical Consultant

    Administrator
    Member Since:
    Apr 22, 2000
    star 7
    thanks guys!

    alright, now i know there's a way you can specify the size of the window to open up as well as other attributes. any tips on how to do this?
  5. Dingo Force Ghost

    Member Since:
    Apr 23, 2001
    star 5
    It's done with javascripting, but I don't have any of my books with me at the moment so I can't give an example.
  6. Grimby Technical Consultant

    Administrator
    Member Since:
    Apr 22, 2000
    star 7
    that's all i need to know. i'll look it up tonight. thanks. :D
  7. dark42 Jedi Knight

    Member Since:
    May 16, 2002
    star 3
    This should do it, but I'm just copying form a site I found on the web. It looks right, though...

    <a href="URL" onClick="window.open('URL','myWin','toolbar=no,directories=no,location=no,status=yes,menubar=no,resizable=no,scrollbars=no,width=300,height=200'); return false">text</a>

    If that doesn't work, let me know, I'll try and figure it out.

    FYI, those are ALL the options you can set. If you don't want to bother with half of them, just take them out.
Thread Status:
Not open for further replies.