Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Looking for an image script


Guest

Recommended Posts

Posted

Hi everyone,

 

I am looking for a simple script, that I can place on my .html pages of my site, that does the same thing as the "click here to enlarge" script for the products in the cart.

 

I will have a few informational pages on herbs and crystals/gemstones where I want to add thumbnail pics to and the visitor can click on the thumbnail for the larger image. I am assuming, like in the cart, I can use one size of the image for both parts.

 

I've tried the free javascript sites. Perhaps I'm just missing it.

 

Thanks in advance for your help in this.

 

Oh, I'll also be using this for a client's site, so it would help us both out!

Posted

Am still looking for the above script ... javascript, html script ....

 

Purty please!

Posted
Am still looking for the above script ... javascript, html script ....

 

Purty please!

 

 

Your javascript :

<script language="JavaScript">

<!--

function popUp(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=1,width=50

0,height=500,left = 376,top = 232');");

}

-->

</script>

 

Your HTML :

<a href="java script:popUp('/path/to/your/bigger/big_image.jpg')"><img src="/path/to/your/small_image.jpg" border=0 alt="My Image"></a>

 

Done.

Perhaps you're just not inserting your js file in the right path ?

 

david

Posted
I am assuming, like in the cart, I can use one size of the image for both parts.

 

Sure you can - but you'll need to use HTML to resize your thumbnail then :

<img src="image.jpg" width="100" height="100">

 

Very annoying to the user who has to wait for a large file size thumbnail to load.

 

david

Posted

David,

 

Thank you so much for responding.

 

So it boils down to the fact that I have to have two sizes for each image: thumbnail and true size.

 

*nods* It'll work.

 

Thank you !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 

Btw - this is the first question I have asked in about 4 months or so that has actually been answered ... I still have about 4-5 questions out there that haven't been answered. I've noticed, since roughly November, that getting help has become much harder. I wonder what happened? Trust me, I understand people have businesses to run (hence why we even started using Osc!) ... but even contribution authors are not responding to their own support threads and such.

 

*sighs* Sowwy - just had to vent ... been getting annoyed having unresolved issues with my cart and no help. I have a new issue that has been popping up and I figure I won't even bother asking. -_-

Posted

David,

 

Just FYI - I will reply to your PM soon .... just need to get this project done for a client .... And Thank you again for your help in this matter! I thoroughly appreciate it!

 

~Barbara

Posted

David,

 

Just FYI - I will reply to your PM soon .... just need to get this project done for a client .... And Thank you again for your help in this matter! I thoroughly appreciate it!

 

~Barbara

Posted

Well ... this isn't working.

 

You can hover the mouse over the image that you click for a popup enlargement and the path is correct, but the pop up doesn't .. well...pop up.

 

It has nothing to do with pop blocker or anythign cause I can click to enlarge on other websites, including my store, and it's fine.

Posted
Well ... this isn't working.

 

You can hover the mouse over the image that you click for a popup enlargement and the path is correct, but the pop up doesn't .. well...pop up.

 

It has nothing to do with pop blocker or anythign cause I can click to enlarge on other websites, including my store, and it's fine.

 

url?

Posted
url?

 

 

 

what text editor do you use ?

 

You have split the eval function into two lines - it needs to be on one line (on line 29) :

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=1,width=50

0,height=500,left = 376,top = 232');");

 

 

That's the only change you need to make.

 

david

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...