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
    Feb 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need Help with a script

    Hallo I have a Tag, that i have to change with Javascript.
    This Tag :
    Code:
    <script src=”http://bs.serving- sys.com/BurstingPipe/adServer.bs?cn=sb&c=17&pli=283815&pi=0&w=300&h =250&ncu=$$[your-adserver-clickstring]$$&ord=[timestamp]”></script> <noscript> <a href=”[your-adserver-clickstring]http%3A//bs.serving- sys.com/BurstingPipe/BannerRedirect.asp%3FFlightID%3D283815%26Page%3 D%26PluID%3D0%26Pos%3D5148” target=”_blank”><img src=”http://bs.serving- sys.com/BurstingPipe/BannerSource.asp?FlightID=283815&Page=&PluID=0&P os=5148” border=0 width=300 height=250></a> </noscript>
    In order to track clicks:
    Add EASLink= parameters into the redirect string and exchange [timestamp] with _U_.


    To This Tag:
    Code:
    <script src=”http://bs.serving- sys.com/BurstingPipe/adServer.bs?cn=sb&c=17&pli=283815&pi=0&w=300&h =250&ncu=$$EASLink=http://emediate.com$$&ord=_U_”></script> <noscript> <a href=”EASLink=http%3A//bs.serving- sys.com/BurstingPipe/BannerRedirect.asp%3FFlightID%3D283815%26Page%3 D%26PluID%3D0%26Pos%3D5148” target=”_blank”><img src=”http://bs.serving- sys.com/BurstingPipe/BannerSource.asp?FlightID=283815&Page=&PluID=0&P os=5148” border=0 width=300 height=250></a> </noscript>


    I tried it with this Code, but it wont work, please can someone help me with the script:
    Code:
    case "EyeBlaster":
    
    
    HrefRegex = /(<a href=\")/gi;
    
    
    
    TimestampRegex = /ord=\[.*\]/gi;
    clickRegex = /ncu=[^&]*/gi;
    
    DisplayContainer.value = DisplayContainer.value.replace(TimestampRegex, "ord=_U_");
    DisplayContainer.value = DisplayContainer.value.replace(HrefRegex, "EASLink=");
    
    if (DisplayContainer.value.match(clickRegex)) {
    DisplayContainer.value = DisplayContainer.value.replace(clickRegex, "ncu=EASLink=");
    } else {
    clickRegex = /ord=/gi;
    DisplayContainer.value = DisplayContainer.value.replace(clickRegex, "ncu=EASLink=&ord=");
    }
    break;
    Last edited by hvikki; 02-10-2010 at 01:01 PM.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,015
    Thanks
    203
    Thanked 2,538 Times in 2,516 Posts
    Do please read the posting guidelines regarding silly thread titles. The thread title is supposed to help people who have a similar problem in future. Yours is useless for this purpose. You can (and should) edit it to make it more meaningful.

    And please help us to help you by following the posting guidelines and wrapping your code in [ code ][ /code ] tags (omit the spaces). This means use the octothorpe or # button on the toolbar which will insert the tags. You can (and should) edit your previous post.


  •  

    Posting Permissions

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