Hi, iam building my own site and i have pictures on there, i dont know any coding but i was hoping you guys might be able to help me out with a code so that when you click the pictures it opens them in a new window in full size. Thanx for your help.
Phil
Enlarging pictures
Started by
Guest_TechNetiuM_*
, Jan 14 2007 02:18 PM
6 replies to this topic
#1
Guest_TechNetiuM_*
Posted 14 January 2007 - 02:18 PM
Guest_TechNetiuM_*
|
|
|
#2
Posted 14 January 2007 - 02:47 PM
So you have a thumbnail and when a user clicks on it you want it to be enlarged?
You can provide a direct link to the image
or rather than opening the image in a whole new window you could use a javascript popup by placing this code some where between your head tags
Then you can link your thumbnail this way
You can provide a direct link to the image
<a href="yourimage.gif><img src="yourthumbnail.gif" /></a>
or rather than opening the image in a whole new window you could use a javascript popup by placing this code some where between your head tags
<script type="text/javascript">
<!--
function openwindow(){
window.open ("yourimage.gif", "Enlarged Image", "toolbar=no, location=no, directories=no, status=no, scrollbars=yes, resizable=no, copyhistory=no, width=400, height=200");
}
//-->
</script>
Then you can link your thumbnail this way
<a href="javascript:openwindow()"><img src="yourthumbnail.gif" /></a>And that would create a 400x200px box with your image in it, if the image you want to display is larger than those dimensions of course you can edit the open.window arguments (meaning the width, height, resizable, ect...)
#3
Posted 15 January 2007 - 09:06 AM
Thanks for the popup thing but as I am using Joomla I'm having an easy way to do these things. But I wanted the Pop-up thing for some times before I got the BOT, anyway it can come in handy and if I need it I'll come to codecall.
#4
Posted 28 January 2007 - 10:35 AM
Regarding thumbnails:
You may already know this, but an image has height and width properties so you can change it's rendered size on the page. Unfortunately, it takes the same amount of time to load as the larger version, so it may work better for you just to create a resized copy of your original image to have as your thumbnail. Anyway, here is some code...
You may already know this, but an image has height and width properties so you can change it's rendered size on the page. Unfortunately, it takes the same amount of time to load as the larger version, so it may work better for you just to create a resized copy of your original image to have as your thumbnail. Anyway, here is some code...
<img src="myimage.gif" height="200" width="300">
#5
Guest_Jordan_*
Posted 31 January 2007 - 05:53 AM
Guest_Jordan_*
Matt said:
Regarding thumbnails:
You may already know this, but an image has height and width properties so you can change it's rendered size on the page. Unfortunately, it takes the same amount of time to load as the larger version, so it may work better for you just to create a resized copy of your original image to have as your thumbnail. Anyway, here is some code...
You may already know this, but an image has height and width properties so you can change it's rendered size on the page. Unfortunately, it takes the same amount of time to load as the larger version, so it may work better for you just to create a resized copy of your original image to have as your thumbnail. Anyway, here is some code...
<img src="myimage.gif" height="200" width="300">
Also, using this method will distort the image and it will probably be very bad quality. Using the "Scale" or "Image Resize" function of a image editor is a much better idea.
#6
Posted 31 January 2007 - 09:10 AM
Yeah, It is better to make 2 Images, 2 BIG and one small.
So you can show the small image and link to the BIG size Image.
So you can show the small image and link to the BIG size Image.
#7
Guest_priorityone_*
Posted 04 February 2007 - 12:29 PM
Guest_priorityone_*
I enjoyed this instructional thread..since I am always wanting to change the size of images to fit in my websites.


Sign In
Create Account

Back to top










