getscript

How do you make the script wait for the status of an Ajax get request before continuing?

Basically what I'm doing is checking for the existence of an object, if it's not found, the script will try to load the source file using getScript. I only want to check this once though then return true or false to the function that calls fetch() fetch:function(obj){ ... isReady = false; $.getScript(obj.srcFile,funct...

When using jQuery's getScript() function I get a "not well-formed" error on a line with comments

My guess is that the src file needs to be XML-friendly, but of course none of the JS file is since it's using all sorts of non-XML compliant entities. getScript() may be expecting an XML file =/ Any thoughts? if(is_def(pObj)){ $.getScript(pObj.src,function(){ pObj.stat = STATUS_OK; $a.dequeue(pObj); ...

Firebug is throwing a ' $( ' error?

I am getting a strange error in Firebug, that I am not getting in Webkit. The error comes up as ' $( ' in firebug. Here's the code that is supposedly causing it to flip: $.getScript("http://kylehotchkiss.com/min/?g=packageHome", function() { $(".countdown").countdown({ until: new Date(2010, 6 - 1, 5), layout:'{dn} {dl}' }); }); ...

Questions about jQuery's getScript()

$.getScript("somescript.js", function() { alert('Load Complete'); }); Once loaded, is it cached or is it loaded again if referenced more than once? If an event depends on this file being loaded, will the event be delayed of fail/timeout in case the file takes longer to load or doesn't load? How do I check and do something in case ...

jQuery $.getScript - old functions & variables in executed script

Hello, i execute a javascript with jQuery $.getScript. In the executed script i haven't access to the functions and variables of my source file. Is there a solution? ...

Jquery getScript($.getScript()) not working on chrome?

Hello Guys, I have a problem using $.getScript() on chrome. It doesn't work on chrome browser. I've tested it on firefox, ie and safari and it worked. All I have on my external script is an "alert()" and it doesn't work. Here's the code: page $(document).ready(function(){ $("#btnGet").click(function(){ $.getScript("script.js"); ...