Forum Moderators: open

Message Too Old, No Replies

pop up window

what's the best method?

         

smokeyb

1:42 pm on May 22, 2004 (gmt 0)

10+ Year Member



I have decided to have some pix on a site, pop up in a new window. Because of navigation issues (don't want the user to move from the catalogue page) I really have to do this. As the pictures are of fine art, I would like them to open in a tight, javascript spawned type window. I have a feeling that this is not a good thing to do (at least the hairs on the back of my neck do), so could someone advise me on this, and if there is a better way? I would love to know about it.
Thanks in advance

ergophobe

2:44 pm on May 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



As far as I know, there are only two ways to do it

- target="blank" (which is deprecated and gives you a lot less control than JS).

- javascript.

Personally, since I use a tabbed browser, I hate links that open in a new window without telling me (because they fail in Firefox). If the link says something like "View larger (new window)" I don't have any problem with it and I think it's often the best solution.

victor

2:59 pm on May 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A Javascript solution works only for those people who have Javascript turned on.

Precise stats on that will depend on your market. But, as a rule of thumb, assume that JS-only navigations won't work for 15% of your initial visitors.

That number may drop after a few months of operation as those not using Javascript will learn to avoid your site.

smokeyb

3:02 pm on May 22, 2004 (gmt 0)

10+ Year Member



Are there other issues with JS like; would they be blocked by pop-up blocker software?

tedster

3:56 pm on May 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I often use a mix:

<a href="page.html" onclick="popUp();return false;" target="_blank">Click Me</a>

That way non-js visitors, including spiders, can still get the page. And I also include some navigation back to the main product page in a <noscript> that follows the window close <script> section on the would-be pop-up page.

Most pop-up blockers today don't block pop-ups that require a user click to open. They usually bock just the onload, onunload 'automatic' pop-up. Users of blockers that do block any instance of window.open should notice that fact soon after installation and be able to cope.

Unfortunately, there are a few blockers on the market (older versions of Panicware, for example) that deactivate the entire link above so even the straight HTML version doesn't work anymore. But the sales are good from the enlargement pages, so on balance, the approach is successful for me.

smokeyb

4:07 pm on May 22, 2004 (gmt 0)

10+ Year Member



That of course, is the perfect solution tedster. I will probably now nip over to the js forum to find out the script to attach to the image, and to set how the "page" looks (size and scrolling etc)... or would you help me again in this thread ted?
Thanks

tedster

4:16 pm on May 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Check msg#4 in the Generic Javascript [webmasterworld.com] thread. Lots of other goodies in that thread as well.

Note: the javascript portion of this discussion is now
split off and moved to the JavaScript Forum itself:
[webmasterworld.com...]