View Full Version : Help with something simple. OnClick

10-01-2012, 12:49 AM
Hi All,

I need a bit of help with something simple.

How can I call the URL section with a javascript?

I want to call the URL in the a href tag from elsewhere on the page.

<a href="JAVASCRIPTURL"><img src=......><a/>

The reason being is that the page is auto generated and if I add a $ sign before the line above it will only display the image if it's in the database, but I need to generate the URL elsewhere on the page, then use it if it's actually displayed and clicked on.

I hope you can understand that!??

10-01-2012, 02:09 AM

let's see if I can explain a bit better. I tried the following but with no luck.

I need to get the id in to the url as the page is generated as this bit of code is replicated several times on the same page.

Is it possible???

<script type="text/javascript">
var videoObj=new Object();

I need to get the value of [catalogid] into the url

$<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>