This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

tony_p4620282
tony_p4620282

Hi I am loading an external page into an existing page which has jquery code in it if I leave the code active in the loaded page I get an error so I have read that I can use getScript(); but the url: parameter needs to be dynamic how would put a dynamic url in code like this $.cachedScript( "assets/js/test.js" ).done(function( script, textStatus ) { console.log( textStatus ); }); this is what I am trying to put in as the url {{'assets/js/theme.js']|theme }} any help with this would be greatly appreciated.

Last updated

tony_p4620282
tony_p4620282

I have got this to work $.getScript('http://yoursite.com/test/combine/b075f6a5b111b3375ecc553c0d813ee5-1534276479', function() { // Call custom function defined }); still get one error "Velocity is already loaded" and as yet haven't found a method for dynamically generated url's

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.