Surf 11 » Archives for May, 2007

Finding the best waves on the web.

Context validation error for tag cfscript

You may get the following error if you are missing a semicolon somewhere in your CFSCRIPT block - you will also get this error if you are missing an ending cfscript tag, however it is more likely that you are just missing a semicolon somewhere.

Context validation error for tag cfscript.

The start tag must have a matching end tag. An explicit end tag can be provided by adding </cfscript>. If the body of the tag is empty you can use the shortcut <cfscript .../>.



JavaScript isInteger Function

It is pretty common that you need to check for an integer in javascript validation code. Here's a simple javascript isInteger function code examples.

function isInteger(s) {
return (s.toString().search(/^-?[0-9]+$/) == 0);
}

Two things to note about our isInteger function. The first is that we are calling the javascript toString() function / method to convert the value to a string, so we can perform the regular expression. The second is that the regular expression allows for negative integers (since by definition an integer can be negative), if you want an unsigned isInt function try the following:

function isUnsignedInteger(s) {
return (s.toString().search(/^[0-9]+$/) == 0);
}


PPC Ad Tracking URL's

Would you like to track visitors that come to your website from a PPC / CPC ad? Both Google Adwords and Yahoo Search Marketing Provide such a service.

Google calls it auto-tagging and has turned the feature on by default. When a user clicks on a ad in the search results google will append the query string ?gclid=SOMEUNIQUEVALUE to the url.

If the ad was from a third party web site (a site using Google Adsense) then you can look in the HTTP referrer for the domain googlesyndication.com.

More info from Google on auto-tagging.

It was a little bit harder to find information on Yahoo's Ad tracking URL parameters because it is disabled by default. You can enable it in your Yahoo Search Marketing Account, by going to the Administration tab and clicking on Tracking URLs.

I found a page here describing what the url's will look like. The gclid won't be there but you may find OVRAW, OVKEY, and OVMTC in the URL Query String.



Subscribe to our RSS Feed: subscribe to this feed XML
Archives   Tags   Contact