how to pass dynamic urls onto clicks

Discussion in 'HTML & Website Design' started by Buckyuk, May 28, 2014.

  1. #1
    Hi,
    I need to pass dynamic url tags onto the target url when clicked, for example.
    If i send a visitor to

    www.example.com/?id=100

    And on that site, there is a hyper link to www.example2.com

    How is it possible to automatically send the click to www.example2.com/?id=100

    Im sure its easy but cant figure it out, thanks so much in advance

    Alan
     
    Buckyuk, May 28, 2014 IP
  2. Wisnu Adi Nurcahyo

    Wisnu Adi Nurcahyo Greenhorn

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #2
    You can use javascript or jQuery
     
    Wisnu Adi Nurcahyo, May 28, 2014 IP
  3. sarahk

    sarahk iTamer Staff

    Messages:
    28,813
    Likes Received:
    4,535
    Best Answers:
    123
    Trophy Points:
    665
    #3
    If you have control over example.com
    then check for the post variable when you create the the links in the page.
    If example.com is a post on a wordpress site then write a simple plugin that checks the content and makes changes to any links in the post.
     
    sarahk, May 28, 2014 IP
  4. Ricardo Neves

    Ricardo Neves Greenhorn

    Messages:
    39
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    20
    #4
    If you can post some code, maybe we could give better answers. But basically with jQuery you can do something like:

    $("#element-you-want-to-change").attr("href","new-url");
     
    Ricardo Neves, May 29, 2014 IP