Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pop up windows 1

Status
Not open for further replies.

z35

Programmer
Dec 21, 2001
206
US
hello,

does anyone know how to call 2 functions in one href tag?

my tag looks like this:
<a href=&quot;javascript:popup('photos/Mod-D-2.jpg','246','328')&quot;>




I have several thumbnails that are links. when you click it the photo opens in a new window and the same window resizes to that photo's exact size.

what is the best way to set this up.

I want to call a resize() function and a popup() function at the same time.
 
try this:

<a href=&quot;javascript:popup('photos/Mod-D-2.jpg','246','328');resize()&quot;>
 
this worked - thank you so much for your help. it was simple but you saved me the frustration of trial and error.

there is a problem though. the url for the win is simply a photo.jpg....the window opens as the exact size in px as the photo. the problem is that part of the photo is cut off because the title bar above covers some and the window borders cut off a bit on the sides.

what script can I get around this? considering everyone's browser pop ups will be shaped differently.

i want a tight fit but without chopping off anything.
 
instead of linking to the inage, try linking to an html file with this code:

<img src=&quot;image.jpg&quot; style=&quot;width:100%;height:100%;&quot;>

this will autosize the inage to fit the window. you can set the window size to fit perfectly for the pic in IE (most people use it) and then let the rest have it be resized for the little differance.
 
so you are saying to have the image distorted a bit, smushed into the window?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top