VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Customization
 image swap
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

JNCRacing
Starting Member

13 Posts

Posted - June 09 2004 :  02:49:05  Show Profile  Reply with Quote
Can somebody tell me if it is possible to have an image swap for product detail using tmp_product.htm.

I would like to have a default image and three thumbnails underneath that image that when the user mouseovers the thumbs the default image changes.

In my case i am trying to use variables such as pother1, pother2, etc. as the jpg's or gif's i'm trying to swap.

The corresponding page for my test item is:

http://www.made-online.com/shopexd.asp?id=32

Thanks



Edited by - jncracing on June 12 2004 16:07:46

al100
Starting Member

United Kingdom
20 Posts

Posted - June 10 2004 :  12:49:11  Show Profile  Visit al100's Homepage  Reply with Quote
This stikes me as difficult in ASP

However, you could put the code in as html / dhtml in the extendeddesc

You will need the option pack though

Alan Foster
http://www.systematic-online.co.uk


Go to Top of Page

devshb
Senior Member

United Kingdom
1898 Posts

Posted - June 10 2004 :  15:08:54  Show Profile  Visit devshb's Homepage  Reply with Quote
I think there's probably quite a few ways of doing that, and the option suggested above would definitely work too.
you can create a generic javascript function to do image-swaps, and then call that in your extended-desc value as suggested above, or....

you could change the template to call that javascript function and embed the [pother1] fields etc in that function call.

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons
Go to Top of Page

JNCRacing
Starting Member

13 Posts

Posted - June 12 2004 :  16:02:17  Show Profile  Reply with Quote
I've been working on this and hopefully someone will be able to tell me why this isn't working...

i'm using tmp_product3.htm and everything is showing up the way it should just not the swaps...

Here is the code:

<script language="javascript">

<!-- hide script from old browsers

window.onerror = null;

var netscape = 0;
var goodIE = 0;
browserName = navigator.appName.substring(0,8);
browserVer = parseFloat(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3)
{ netscape = 1; }
if (browserName == "Microsof" && browserVer >= 4)
{ goodIE = 1; }
// end error trapping code


if (netscape || goodIE) {

pic1 = new Image(250,300);
pic1.src = "[extendedimage]";
pic2 = new Image(250,300);
pic2.src = "[pother4]";
pic3 = new Image(250,300);
pic3.src = "[pother5]";

a1 = new Image(83,100);
a1.src = "[pother2]";
a2 = new Image(83,100);
a2.src = "[pother2]";
b1 = new Image(83,100);
b1.src = "[pother3]";
b2 = new Image(83,100);
b2.src = "[pother3]";
}

function hiLite(imgDocID, imgObjName, imgDocID2, imgObjName2) {
if (netscape || goodIE) {
document.images[imgDocID].src = eval(imgObjName + ".src");
document.images[imgDocID2].src = eval(imgObjName2 + ".src");

}}

//end hiding -->
</script>

in the cell that contains the default large image:

<img src="[extendedimage]" name="pic" alt="[cname]" height=300 width=250>


then on the place where the small images go:

<td width="172"><div align="center"><a href="" onMouseOver="hiLite('pic','pic2','a','a2'); window.status='Button 1';return true;" onMouseOut="hiLite('pic','pic1','a','a1'); window.status='';return true;" onclick="window.focus()"><img SRC="[pother2]" NAME="a" ALT="[cname]" BORDER=0 height=100 width=83></a>
<a href="" onMouseOver="hiLite('pic','pic3','b','b2'); window.status='Button 2';return true;" onMouseOut="hiLite('pic','pic1','b','b1'); window.status='';return true;" onclick="window.focus()"><img SRC="[pother3]" NAME="b" ALT="[cname]" BORDER=0 height=100 width=83></a></td>

To view this in action:

http://www.made-online.com/shopexd.asp?id=32

Thanks...



Edited by - jncracing on June 12 2004 18:33:58

Edited by - jncracing on June 12 2004 18:51:41

Here's an update:

I took the javascript portion out of the tmp_product3.htm file and put it into the head of shoppage_header.htm. It's now trying to swap images but its still not quite right so if anyone can help me i'd really appreciate it.

Thanks

Edited by - jncracing on June 13 2004 00:59:01
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000