The Little Guy
01-09-2004, 11:04 AM
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?
|
Click to See Complete Forum and Search --> : picture enlargement The Little Guy 01-09-2004, 11:04 AM 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? Daria 01-09-2004, 01:05 PM <html> <head> <script language="JavaScript"> <!-- //BEGIN Script function new_window(url) { 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 } //--> </script> </head> <body> <noscript><a href="image1.jpg">click here</a> to view enlarged picture, and click "back" when you are done</noscript> <a href=javascript:new_window('images/image1.jpg')> <img src="image1.jpg" border=0 width="100" height="100"></a> </body> </html> ----------------------- 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 <img src="image1_thumbnail.jpg" border=0></a> The Little Guy 01-09-2004, 09:10 PM I dont know why but im not able to get the javascript to work help me plz. 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 Paul Jr 01-09-2004, 09:27 PM 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. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head><title>Example</title> <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <script type="text/javascript"> function openwin() { properties = "scrollbars=no,menubar=no,directories=no,toolbar=no,status=no,location=no,resizable=no,width=284,heig ht=282"; window.open(this.href,'Nameofwindow',properties); } </script> </head> <body> <a href="Misc/display.jpg" onclick="openwin(); return false;"> <img src="Misc/display.jpg" height="100" width="100" alt="Thumbnail Image" /></a> </body> The Little Guy 01-09-2004, 09:31 PM Cool Thanks it worked:D Paul Jr 01-09-2004, 09:36 PM Originally posted by The Little Guy Cool Thanks it worked:D You're welcome! Wow, I'm stoked, nothing I ever do in JS works! Lol. ;) webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |