I have downloaded some example code from cj. It has a piece of javascript that defines a function (loadKeywordAds) and it calls this function in the body tags like this: <body onload="loadKeywordAds('placeholder');"> Code (markup): Since I only want to use it on certain pages, I am trying to find alternatives that lets me paste a piece of html (or php) that does the same thing somewhere else on the page.
window.addEventListener('load', function() { loadKeywordAds('placeholder'); }, false); Code (markup): Grab this if you want to use event listeners in both IE and W3C event model-compliant browsers.