If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / How to make a single image (not a product image) enlarge into its own popup window?

How to make a single image (not a product image) enlarge into its own popup window?

Started by j9mm0 on 17 Sep 2011, 10:44 PM · Views: 1,439

Results 1 to 6 of 6
17 Sep 2011, 10:44 PM
#1
j9mm0 avatar

j9mm0

Zen Follower

Join Date:
Feb 2011
Posts:
106
Plugin Contributions:
0

Post #1 by j9mm0

Hi,
We have created some new information pages with images and would like to know how a customer can click on the image and it pops up large in its own window (similar to how the product images work) so they can see it better.
Please see http://www.selfbuildplans.co.uk/index.php?main_page=buildcosts
and the build cost image in grey, that I want customers to be able to click it to read better.
I have the image as a larger image but cant figure out the hyperlink code for it to popup large...
Please help...

Thanks.

17 Sep 2011, 10:56 PM
#2
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Post #2 by nigelt74

Theres 2 ways you can either use code like the below, (obviously change width and height to suit)

<a href="#" onClick="MyWindow=window.open('LOCATION_OF_LARGE_IMAGE','MyWindow','toolbar=no,location=no,directories=no,status=no, menubar=no,scrollbars=no,width=600,height=300'); return false;">SMALL_IMAGE</a>

Or you can use the inbuilt popup method

BUT, I think (and i am possibly wrong) the inbuilt one sets itself to the size of your large product image setting, which could make your plans appear in a fairly small window

Webzings Design
Semi retired from Web Design

18 Sep 2011, 12:03 AM
#3
j9mm0 avatar

j9mm0

Zen Follower

Join Date:
Feb 2011
Posts:
106
Plugin Contributions:
0

Post #3 by j9mm0

Thanks Nigelt74 that was a quick reply.
However, I have tried your link but I must have the path incorrect to the actual large image as it just goes back to the home page when you click it.
Could you give us some help in the path required where you state 'LOCATION_OF_LARGE_IMAGE'?
The images are in /images but do I need http:// path or the whole website path? I have tried a few options but can't get it to work...
Thanks for your help.

18 Sep 2011, 12:10 AM
#4
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Post #4 by nigelt74

J9MM0:

Thanks Nigelt74 that was a quick reply.
However, I have tried your link but I must have the path incorrect to the actual large image as it just goes back to the home page when you click it.
Could you give us some help in the path required where you state 'LOCATION_OF_LARGE_IMAGE'?
The images are in /images but do I need http:// path or the whole website path? I have tried a few options but can't get it to work...
Thanks for your help.
You will need to show me the code you are using, as looking at the page you seem to have done something odd as i can see part of the code on the actual page

Webzings Design
Semi retired from Web Design

18 Sep 2011, 12:14 AM
#5
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Post #5 by nigelt74

This is what you should have

<a href="#" onClick="MyWindow=window.open('/images/Build Costs September 2011.png','MyWindow','toolbar=no,location=no,directories=no,status=no, menubar=no,scrollbars=no,width=800,height=400'); return false;"><img src="/images/Build Costs September 2011 med.png"</a>

Webzings Design
Semi retired from Web Design

18 Sep 2011, 4:37 PM
#6
j9mm0 avatar

j9mm0

Zen Follower

Join Date:
Feb 2011
Posts:
106
Plugin Contributions:
0

Post #6 by j9mm0

Nigelt74 - That's great it works a treat, really appreciate it.
Thanks.