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
 General help me questions
 Help with some javascript
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Mark Priest
VP-ASP Expert

United Kingdom
570 Posts

Posted - October 01 2012 :  05:16:51  Show Profile  Reply with Quote
Hi All

I'm trying to get a watch video link to only show when the video is in the database, but because the link has two variables in it, the video [level3] and a link to the ext description [catalogid] i cant use the $ trick.

I'm trying to do it with javascript but not having much luck.

The first bit works, but I can't get it in the URL.

<script type="text/javascript">
var videoObj=new Object();
videoObj.catid="[catalogid]";
</script>
$<a href="shopexd.asp?id=javascript:videoObj(catid)" id="[level3]"><img src="/images/icons/video.gif" alt="watch video of this firework" width="105" height="48" border="0" /></a>

Regards,

Mark
Firework Crazy

manilow
VP-ASP New User

France
106 Posts

Posted - October 01 2012 :  09:29:28  Show Profile  Visit manilow's Homepage  Reply with Quote
Hi Mark,

I can't really see what you would like to obtain. Could you show the type of URL with video, and one without video?

Regards,

Erik
www.aquathermia.com
Go to Top of Page

Mark Priest
VP-ASP Expert

United Kingdom
570 Posts

Posted - October 01 2012 :  09:47:45  Show Profile  Reply with Quote
This page shows the video link

http://www.fireworkscrazy.co.uk/store/shopdisplayproducts.asp?id=35&cat=Category+2+-+5+and+8+Metre+Garden+Fireworks

The link takes you to the extended description page to show the video, but I only want it to show the link (image) if there is a video on that page.

Regards,

Mark
Fireworks For Sale
Go to Top of Page

manilow
VP-ASP New User

France
106 Posts

Posted - October 01 2012 :  10:19:48  Show Profile  Visit manilow's Homepage  Reply with Quote
Mark,

If you want to display an image with a link to shopexd.asp when a video of that particular product is specified in level3, the following line would do. Insert [level3] in the same line:

$<a href="shopexd.asp?id=[catalogid]"><img src="/images/icons/video.gif" alt="watch video of this firework" width="105" height="48" border="0" title="[level3]" /></a>



If you want to display the link in all cases but add level3 when it contains information, you could define a link in your template on separate lines:

<a href="shopexd.asp?id=[catalogid]"><img src="/images/icons/video.gif" alt="watch video of this firework" width="105" height="48" border="0"

$ title="[level3]"

/></a>




I used the TITLE tag just for example, but it could be any other tag.

I hope this will help.

Erik
www.aquathermia.com
Go to Top of Page

Mark Priest
VP-ASP Expert

United Kingdom
570 Posts

Posted - October 01 2012 :  11:01:22  Show Profile  Reply with Quote
Hi Erik

I don't think it will hide the image though as there are two tags in the line.

I will give it a try though.

Regards,

Mark
Fireworks For Sale
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000