Questions tagged [getscript]

188 questions
0
votes
1 answer

Loading a javascript file multiple times via consecutive ajax requests

I have a page with about 30 forms on it, for client management, but the forms are only called to the page when the user clicks to open a specific form. Part of the output is a jQuery.getScript() function to load the source file for that particular…
Works for a Living
  • 1,262
  • 2
  • 19
  • 44
0
votes
3 answers

How to use function declared in different JS file using jQuery getScript?

I have two JS files. One is called common.js and it use $.getScript to include other file with my js code. Part of including looks like this: jQuery.getScript(js_path + "table.js", function(){ generateTable(chartData, dataTypes); }); This file…
David
  • 1,932
  • 3
  • 27
  • 35
0
votes
1 answer

Where does jquery's getscript() function look when called in an external file?

If i have a file system like: project -> public -> js -> myfile.js If i call getScript() in myfile.js where does it look at first? Is this generally true for other things? For example if I call getScript("myotherfile.js") and myotherfile.js is in…
Bren
  • 3,516
  • 11
  • 41
  • 73
0
votes
0 answers

jQuery getScript() - Uncaught TypeError: Cannot read property 'done' of undefined

I am facing issues while using getScript() function, here is my script $.getScript("script.js").done(function(script, textStatus,jqxhr) { console.log(jqxhr.status); }) .fail(function(jqxhr, settings, exception ) { …
Siva
  • 3,297
  • 7
  • 29
  • 35
0
votes
4 answers

lock browser while loading external scripts

I'm loading external javascript using jquery $.getScript(url, callback), what I want to achieve is to lock the browser untill the script is loaded, I've tried using $.ajax instead whith async: false but with no better results
MaK
  • 596
  • 4
  • 23
0
votes
1 answer

Append embed code (script tag with dynamic variables)?

I need to append embed code with dynamic variables: http://www73.zippyshare.com/v/57510152/file.html var c = '