Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Opening a second window

0 views
Skip to first unread message

Penster

unread,
Feb 7, 2002, 5:05:46 PM2/7/02
to
I have a gallery of thumbnail pictures so that when you click on one, the
full size one opens up. I have seen sites where the full size picture comes
up in a second smaller window. How is this done? Is it a javascript thing?
Many thanks


Robert Taylor

unread,
Feb 7, 2002, 6:12:08 PM2/7/02
to
<a
href="javascript:void(open('page.htm','titlehere','scrollbars=no,width=320,h
eight=240'))">

try that but stick varible for page name/picture etc, will work for img src
not just web :)
--

Regards,

Robert Taylor.

Studio 51 Internet Solutions

http://www.studio-51.co.uk

mailto:robert...@studio-51.co.uk
---------------------------------------------------------------------------
Quality Internet Solutions for Home and Business
---------------------------------------------------------------------------


Dave

unread,
Feb 7, 2002, 7:16:58 PM2/7/02
to

"Penster" <sdfth...@ukmax.com> wrote in message
news:oHC88.4171$H37.8...@news2-win.server.ntlworld.com...


If I understand you correctly the effect you are looking for can be achieved
with the JavaScript coding I use on my site www.dmgroom.com . Go to the
journal section, chose a country and then scroll through the text until you
get to an image of a camera. Click on the camera and a pop up appears with
a photo in it.

Code appears to work on IE5 & NN4.

Dave


notr...@excite.co.uk

unread,
Feb 7, 2002, 8:29:05 PM2/7/02
to

unless you need the smaller window doesn't
TARGET="_blank" do what you want

Stuart Millington

unread,
Feb 8, 2002, 6:08:14 AM2/8/02
to
On Thu, 7 Feb 2002 23:12:08 -0000, "Robert Taylor"
<robert...@studio-51.co.uk> wrote:

><a
>href="javascript:
[SNIP broken code]


>try that but stick varible for page name/picture etc, will work for img src
>not just web :)

s/work for img src not just web :)/not work for many people./

To do it without breaking the basic href mechanism and relying on
client-side browser features try:

<a href="page.html" target="newwindow" onclick="void(
window.open('page.html','newwindow','height=x,width=y,scrollbars=yes')
)">Open image in new window</a>

--
------------------------------------------------------------------
- Stuart Millington -
- mailto:ph...@dsv1.co.uk http://www.z-add.co.uk/ -
- *ALL* HTML e-mail rejected -

Jim Ley

unread,
Feb 9, 2002, 5:49:37 AM2/9/02
to
On Thu, 7 Feb 2002 23:12:08 -0000, "Robert Taylor"
<robert...@studio-51.co.uk> wrote:

><a
>href="javascript:void(open('page.htm','titlehere','scrollbars=no,width=320,h
>eight=240'))">
>
>try that but stick varible for page name/picture etc, will work for img src
>not just web :)

Then when you've tried it, throw it away and start again as you'll
soon see that many of the places you try it get a "protocol error",
others will get nothing and others will get javascript errors.

<a href="moomin.html" target="moomin"
onclick="window.open('','moomin','width=200,height=200')">page</a>

Some notes on this solution:

The target, no return false is used, because there are many browsers
which can now block window.open, however when they do this they still
execute javascript and the return false stops the navigation. This
means that we have to do the commonly disliked target="" fallback
method.

Jim.

0 new messages