creating popup windows

  • Thread starter Thread starter tarquinlinbin
  • Start date Start date
T

tarquinlinbin

I have a web page which has images on it,small images which have been
auto thumbnailed. The pictures are also hyperlinks and when clicked,a
new browser page opens and displays the picture. Unfortunately the
newly opened broswer window which displays the picture is almost
always full size and really,i;d like it to be much more like a popup
window so that it is just the right size for the displayed image and
no bigger,,i.e no white background is visable within the browser
window,just the image. Can anyone give me clues on how to do this?

ta,,joe
 
tarquinlinbin said:
I have a web page which has images on it,small images which have been
auto thumbnailed. The pictures are also hyperlinks and when clicked,a
new browser page opens and displays the picture. Unfortunately the
newly opened broswer window which displays the picture is almost
always full size and really,i;d like it to be much more like a popup
window so that it is just the right size for the displayed image and
no bigger,,i.e no white background is visable within the browser
window,just the image. Can anyone give me clues on how to do this?

ta,,joe

Use a "javascript popup hyperlink"

Google for that and you will find tons of examples, and maybe even a site
that makes the code for you.
 
Use a "javascript popup hyperlink"

Google for that and you will find tons of examples, and maybe even a site
that makes the code for you.
thanks for the tip,ive found a code generator for that but how does
that bit of code which is generated,fit in with the autothumbnailed
pic which is a clickable link ?,i.e clcick on the auto thumbnailed
image to launch popup and display the bigger image?
 
-----Original Message-----
I have a web page which has images on it,small images
which have been auto thumbnailed. The pictures are also
hyperlinks and when clicked,a new browser page opens and
displays the picture. Unfortunately the newly opened
broswer window which displays the picture is almost
always full size and really,i;d like it to be much more
like a popup window so that it is just the right size for
the displayed image and no bigger,,i.e no white
background is visable within the browser window,just the
image. Can anyone give me clues on how to do this?


You have to modify the thumbnail's hyperlink to call the
window.open method, as shown below.

<a href="javascript:window.open
('/images/mypicture.jpg',null,'height=200,width=400,status=
no,toolbar=no,menubar=no,location=no');void(0);">

The height= and width= settings specify the *external*
size of the new window. Making the window just large
enough to show the whole picture is a problem, because you
can't know in advance how much space the window borders
consume. You'll probably have to make the window a little
over-sized, and hope for the best.

For more information about the window.open method, browse:
http://msdn.microsoft.com/workshop/author/dhtml/reference/m
ethods/open_0.asp

Microsoft Office FrontPage 2003 Inside Out comes with a
test page that displays the browser's current external and
internal window sizes. This may be helpful when estimating
the external window size needed to provide a given
internal space. You can preview this page at:

http://www.interlacken.com/fp11iso/ch19/windowsize.htm

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top