http://www.dougv.com/blog/2007/02/07/showing-a-larger-image-from-a-thumbnail-onclick-via-javascript-dom/
2007-03-24 06:07:33
·
answer #1
·
answered by Anonymous
·
0⤊
0⤋
As with most design scenario, there's a complicated and a not-so-complicated way to handle this. I'll give you the easier of the two:
First-off, you're going to want to ensure you know the full address to your high-def (larger) image. Note this as you will be linking to it soon. Type the address into a web browser like any other page and ensure that it pulls up the "enlarged" image. If it does not, you have to reposition the actual file on a server (or in another folder on the server) that allows direct file access.
Something to ask yourself at this point is if you're interested in pleasing low-bandwidth users. If so, I'd advise making a second copy of the image, this time resized to be used as your original, clickable, enlargeable image.
In Dreamweaver when you insert a picture and select it, you're moved to the image preferences pane. There you have the option to add a hyperlink to the image, allowing it to lead your viewers elsewhere like any other link when the image is clicked. There's also the option of your link's "target", or otherwise how the link will be opened. The two to note are _self (opened in the same window, replacing your page) and _blank (opened in a new window atop your page, keeping your users from closing the main window and losing interest). You can figure from the explanations which one I'm going to tell you to use.
Link your small image to the address of your large image using the _blank target will open up a new window with your large image in it, and when closed the user will be right back where they were.
That's it!
Now, the more complicated versions include JavaScript, layers, and my personal favorite: Flash. But I'll let you ask for those specifically before I dive into that sea!
- J.
2007-03-24 00:58:42
·
answer #2
·
answered by jjcsforwood 1
·
0⤊
0⤋
You will need just your full size image.
1. Identify the height & width of your image, and determine how big you want your thumbnail to appear.
2. Cut and paste the code provided below into editor(dreamweaver)
3. Edit the script to reflect the name of the image, and the respective size for displaying the thumb and the full picture.
4. Click on 'place your url ' and insert the image you wish to use to be clicked on.
5. Publish
where you see center you just add where your image is place ex align= left
Click thumbnail to enlarge
Double click to shrink
onclick="javascript: myImage.height =228;myImage.width=338"
ondblclick="javascript: myImage. width =120;myImage.height=46">
when adding the code take out the spaces with in the code example should be no space "myimage
I had to add spaces in the code inorder for you to read it
2007-03-24 00:55:17
·
answer #3
·
answered by Wowwie 3
·
0⤊
0⤋
Checkout the javascript options available in the dreamweaver 8 in "behaviour "section. also you can download the image view changing javascript from net.
2007-03-24 00:29:16
·
answer #4
·
answered by Linux 3
·
0⤊
0⤋
create a seperate page just featuring that picture - use javascript to get i tto open in a new window
2007-03-24 00:05:21
·
answer #5
·
answered by gareth h 2
·
0⤊
0⤋
just do a link to the file, the same sort of root you would use to link to another website page only dont forget to use the extention of the file too example - /yourfolder/myfile.zip
2016-03-29 01:58:41
·
answer #6
·
answered by Anonymous
·
0⤊
0⤋