Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > javascript pop-up window help

javascript pop-up window help
Thread Tools
Grizzled Veteran
Join Date: May 2002
Location: Houston, TX
Status: Offline
Reply With Quote
Feb 13, 2004, 11:09 AM
 
I'm building a site for a relative. This site has a gallery with images of various sizes. I made a thumbnail for each image, those are all the same size. I allready have a javascript to open a pop-up window with the full-size image when the user clicks the thumbnail. What I need is a script to open a pop-up window that auto-sizes to the image it is displaying. Can anyone help with this? Here's what I have now:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <SCRIPT LANGUAGE="JavaScript"> <!-- Original:_ Eric King (eric_andrew_king@hotmail.com) --> <!-- Web Site:_ http://redrival.com/eak/ --> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin function NewWindow0(mypage, myname, w, h, scroll) { var winl = (screen.width - w) / 2; var wint = (screen.height - h) / 2; winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable' win = window.open(mypage, myname, winprops) if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } } //_ End --> </script> </head> <body bgcolor="#CCCCCC" text="#000000" link="#FF6600" vlink="#CC9966" alink="#FF0000" leftmargin="0" topmargin="0" bgproperties="fixed" marginwidth="0" marginheight="0"> <div align="left"><a href="fullsizeimage.jpg" onClick="NewWindow0(this.href,'name3','500','500','yes');return false;" <img src="thumbnailimage.jpg" width="150" height="150" border="0"></a></div> </body> </html>
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:59 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2