Skip to content Skip to sidebar Skip to footer

Javascript Link Loaded With Ajax

With ajax I use the below function 'addScript' to add a js file to the loaded page. This works just fine with addScript('SlimBox/js/mootools.js'); however I can not get it to work

Solution 1:

The URL you are loading returns HTML, not JavaScript. This seems to be because you are using & instead of just &. Replace & with & and that should solve your problem:

addScript("//www.gmodules.com/ig/ifr?url=http://www.mortgage-info.com/gadgets" +
    "/gadgetsmortgagecalculator.xml&synd=open&w=250&h=200&title=Mortgage+Calculator" +
    "&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js");

Post a Comment for "Javascript Link Loaded With Ajax"