...

View Full Version : Need Help with a script



hvikki
02-10-2010, 12:32 PM
Hallo I have a Tag, that i have to change with Javascript.
This Tag :


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


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


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;

Philip M
02-10-2010, 01:41 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum