How do I click on an image to enlarge it?

Familiar with web-design ? Trouble with images, tables ? Any other queries ?

Moderators: agsone, Neil Parks, gregtutor, BobCP, Lem3

How do I click on an image to enlarge it?

Postby orion1500 on Fri Nov 06, 2009 10:21 pm

I would like to click on my website images to enlarge them, but I cannot seem to figure out how to do so.

Kompozer is not giving me instructions. My online research found a Java script that says it will do what I need, but I am hesitant to use it, and I don't really know exactly where to insert the script, and on how many pages. I do not understand much of the terminology, so I need a little hand-holding to get me started. Being a newbie to web design can be overwhelming, so go easy on me, please.

Thanks
orion1500
 
Posts: 8
Joined: Thu Sep 10, 2009 5:20 am
Country: United States (us)

Re: How do I click on an image to enlarge it?

Postby dr-john on Fri Nov 06, 2009 11:22 pm

Have a small image on your web page and a larger image on your web site.
Make an ordinary hyperlink from the small image to the large image.

Clicking doesn't enlarge unless you are doing something clever such as you have created a slideshow. (or have a tried to show an image bigger than the user's viewport can fully display, of course)

kompozer is an editor, why would it give you instructions on design techniques?
dr-john
 
Posts: 141
Joined: Wed May 13, 2009 1:37 pm

Re: How do I click on an image to enlarge it?

Postby orion1500 on Fri Nov 06, 2009 11:34 pm

Remember when I said I don't know terminology? Well, I just looked up the difference between a webpage and a website, so I had better clearify.

I have a webpage with pictures of my items for sale. The images are bigger than thumbnails, say 170x150, but not big enough to show detail. I wanted to have the visitors be able to click on the image and a larger, more detailed image will appear. I need to know how to make that possible. All the images are my own and stored on my harddrive.

Kompozer has instructions on how to accomplish the tasks it offers. That's what I was looking for, not design help, although Kompozer does offer designing techniques.
orion1500
 
Posts: 8
Joined: Thu Sep 10, 2009 5:20 am
Country: United States (us)

Re: How do I click on an image to enlarge it?

Postby orion1500 on Sat Nov 07, 2009 7:12 am

OK, I figured out how to get the link to work. But it opens in a seperate window with a huge white area around it. I would prefer it didn't.

If someone can tell me how to keep the enlarged pic to just overlay the original image without having to close another window, I would be forever grateful. Maybe what I need is the mouseover thing. But I am having trouble with that. I found a Java script and tried it, but it isn't working wither. I use Windows XP, if that makes any difference.

This is what I used:

<img src="images/1.jpg" onmouseover="this.src='images/2.jpg';" onmouseout="this.src='images/1.jpg';" alt="" />

I replaced the numbers 1 and 2 with the image files. Where did I go wrong? This is turning my brain into soup.

Thanks!
orion1500
 
Posts: 8
Joined: Thu Sep 10, 2009 5:20 am
Country: United States (us)

Re: How do I click on an image to enlarge it?

Postby BobCP on Sat Nov 07, 2009 3:58 pm

What you are trying to use is only a small part of the Javascript, since onmouseover is not valid html.

Have you placed the script code in the head as described here?

There are ways to do this with CSS too.

Look at this Stu Nichols technique.
BobCP
Moderator
 
Posts: 921
Joined: Sat May 26, 2007 10:03 am
Location: Connecticut

Re: How do I click on an image to enlarge it?

Postby Webman on Sat Nov 07, 2009 4:49 pm

Highlide JS is a nice Javascript for images and galleries.
http://highslide.com
Webman
 
Posts: 21
Joined: Sun Jul 01, 2007 10:57 am
Location: Sweden

Re: How do I click on an image to enlarge it?

Postby dr-john on Sat Nov 07, 2009 6:05 pm

Perhaps you should try using slimbox, a lightbox clone.
http://www.digitalia.be/software/slimbox
Do read the instructions , so you can get it to work. It is relatively easy to do.

you can see an example that I made at
http://www.alcaidesa-golf.co.uk/pictures.htm

Re image on a white background
If you want to have a better appearance, make a page for each large image and style it as suits you.
dr-john
 
Posts: 141
Joined: Wed May 13, 2009 1:37 pm

Re: How do I click on an image to enlarge it?

Postby orion1500 on Sun Nov 08, 2009 2:13 am

Wow, thanks everyone! The Stu Nichols technique and Highslide are perfect!

Of course, I have more questions.

Are both of these programs totally safe? Being recently hijacked makes me paranoid.
Will both of these work with my Windows XP and Kompozer?
How about other computers that are looking at my website? Will they see what I see?

Maybe I should tell you that the webpage I need this technique for is a shopping page with alot of images that will change as I sell the item, which I'm beginning to think may not be too often.

Oh, and I did get the onmouseover thing to work in that it changed to the larger image, but kept it squished into the original size image box. I was using two files with resized images.

Remember, I really don't know what I am doing.
orion1500
 
Posts: 8
Joined: Thu Sep 10, 2009 5:20 am
Country: United States (us)

Re: How do I click on an image to enlarge it?

Postby BobCP on Sun Nov 08, 2009 1:07 pm

The Stu Nichols CSS technique is perfectly safe since it's straight html. All the action happens within your browser.

The only reason not to use Javascript is that some (very few, actually) user's security might have it disabled. But no one's going to hijack the server if you use it.
BobCP
Moderator
 
Posts: 921
Joined: Sat May 26, 2007 10:03 am
Location: Connecticut

Re: How do I click on an image to enlarge it?

Postby dr-john on Sun Nov 08, 2009 11:41 pm

orion1500 wrote:
Remember, I really don't know what I am doing.

We worked that out for ourselves. :)
dr-john
 
Posts: 141
Joined: Wed May 13, 2009 1:37 pm

Re: How do I click on an image to enlarge it?

Postby orion1500 on Mon Nov 09, 2009 3:24 am

Webman, thanks for the Highslide suggestion. I downloaded it and will try to figure it out. It looks great.

BobCP, thanks, too, for your input. I feel more relaxed about Javascript now.

dr-john, thank you also, although if I was easily intimidated, your replies may have sent me running. If you hadn't ended your last post with a smile, I would have lambasted you for your sarcasm. Please remember that we newbies come here for help. I taught myself to set up a website, got it published, and all without any computer training or help from my husband and kids, and did it in a few days. I am also trying to learn html so I can communicate better on your terms. So be nice!

Thanks again everyone!
orion1500
 
Posts: 8
Joined: Thu Sep 10, 2009 5:20 am
Country: United States (us)

Re: How do I click on an image to enlarge it?

Postby patjr on Tue Nov 10, 2009 3:43 pm

Humm, I'm butting in here, sorry.

If you are hosting that website on your own server with XP you might want to stick with safer methods or better yet get paid for hosting so a highly trained tech can keep after the security issues flooding the internet these days.

my 2 cents
Good Luck
be sure to post a link your site
Pat Jr.
patjr
 
Posts: 23
Joined: Fri Nov 02, 2007 5:17 pm


Return to General Q & A


Who is online

Users browsing this forum: Alexa [Bot] and 1 guest