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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    problem with affiliate code syntax

    Hello,

    I am looking to create a function that will prefix a given URL with my affiliate code using javescript, and send the surfer to the affiliate link and URL combined

    I am forced to do it in js because the affiliate link is not XML compliant.


    Example:

    I want the link passed through the browser to be;

    http://blah.com/refferer.cgi?setcook...p://moveon.com

    but the XML will not accept:

    http://blah.com?setcookie&URL=

    So I will need a funtion to add this to the URL

    Any help would be apreciated

    TIA
    Last edited by playful; 02-01-2007 at 11:21 PM.

  • #2
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oops! Forgot to escape the &

    But when I use & it will not set a cookie. So back to the original question, can I add this "prefix" using JavaScript?
    Last edited by playful; 02-01-2007 at 11:19 PM.

  • #3
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,302
    Thanks
    28
    Thanked 276 Times in 270 Posts
    Quote Originally Posted by playful View Post
    but the XML will not accept:

    http://blah.com?setcookie&URL=
    Is this even a valid URL with the ampersand escaped? Maybe that’s why it won’t work?
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #4
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is an example link, but the link I am using is valid. I know the link will not work with the ampersand escaped.


  •  

    Posting Permissions

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