Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help with something simple. OnClick

    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!??

  • #2
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OK,

    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();
    videoObj.catid="[catalogid]";
    </script>

    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>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •