picture enlargement

liunx

Guest
When a person clicks on a picture is it possible to make it automaticly enlarge the picture in a differnt window, without haveing to make a page for each individual picture?<!--content--><html><br />
<head><br />
<script language="JavaScript"><br />
<!--<br />
//BEGIN Script<br />
function new_window(url) <br />
{<br />
link = window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=250,height=375, left=80,top=30");link.focus(); // change to suit your needs<br />
}<br />
<br />
//--><br />
</script><br />
</head><br />
<body><br />
<noscript><a href=http://www.webdeveloper.com/forum/archive/index.php/"image1.jpg">click here</a> to view enlarged picture, and click "back" when you are done</noscript> <br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/javascript:new_window('images/image1.jpg')><br />
<img src=http://www.webdeveloper.com/forum/archive/index.php/"image1.jpg" border=0 width="100" height="100"></a> <br />
</body><br />
</html><br />
<br />
<br />
<br />
<br />
-----------------------<br />
<br />
or you can create a thumbnail of the large image, - thus avoiding the need to put width/height in the lin, then change img src line, for example<br />
<br />
<img src=http://www.webdeveloper.com/forum/archive/index.php/"image1_thumbnail.jpg" border=0></a><!--content-->I dont know why but im not able to get the javascript to work help me plz.<br />
<br />
When I test it I click on the picture and I get "The page cannot be displayed" and in the address box I get C:\Program Files\Chami\HTML-Kit\java<!--content-->You can try this; although I get a 404 too, in the address bar it says "undefined". I'm quite new at this, so it's kinda a stab-in-the-dark kind of thing.<br />
<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"<br />
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><br />
<br />
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><br />
<head><title>Example</title><br />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1" /> <br />
<meta http-equiv="Content-Style-Type" content="text/css" /><br />
<meta http-equiv="Content-Script-Type" content="text/javascript" /><br />
<script type="text/javascript"><br />
function openwin() {<br />
properties = "scrollbars=no,menubar=no,directories=no,toolbar=no,status=no,location=no,resizable=no,width=284,heig ht=282";<br />
window.open(this.href,'Nameofwindow',properties);<br />
}<br />
</script><br />
<br />
</head><br />
<body><br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"Misc/display.jpg" onclick="openwin(); return false;"> <br />
<img src=http://www.webdeveloper.com/forum/archive/index.php/"Misc/display.jpg" height="100" width="100" alt="Thumbnail Image" /></a><br />
<br />
</body><!--content-->Cool Thanks it worked:D<!--content-->Originally posted by The Little Guy <br />
Cool Thanks it worked:D <br />
You're welcome!<br />
Wow, I'm stoked, nothing I ever do in JS works! Lol. ;)<!--content-->
 
Back
Top