Questions tagged [getscript]

188 questions
0
votes
0 answers

jQuery AJAX: loading unique JS files only in success callback

I've an ajaxified site having structure like this:
content here
Now when any link is clicked, a jQuery…
Faisal Khurshid
  • 1,869
  • 3
  • 21
  • 27
0
votes
1 answer

"has no method 'getscript'" in Node.js server using Express

I have a server in Node.js and I use Express to make a web app. My server (app.js) gets data from a form (by Ajax post method) and I want that it proceeds this data by using the code of another file (anotherfile.js). I used this solution:…
GBC
  • 345
  • 3
  • 8
  • 23
0
votes
0 answers

Is calling getScript multiple times still a synchronous operation?

I'm working through loading javascript dependencies and I'm trying to answer a question about how getScript works. I've built loading code that will automatically load scripts using getScript, basically by looping through an array of filepaths and…
Joel Graff
  • 167
  • 15
0
votes
1 answer

Javascript API not working properly after Jquery getscript

I'm experimenting with the javascript Maps API. I started creating a little Web page, calling the API for showing a map and adding a standardmarker. Working great. Now I want to use this in SharePoint, using JSLink for lists. So I made JQuery…
0
votes
2 answers

Play Framework - Defining my Javascript file within a function

I'm using the Play Framework and am trying to define a javascript file within a function in another javascript file (the reason being that I don't want these functions to be usable outside of the container function). So I have two javascripts…
Gary
  • 395
  • 2
  • 7
  • 24
0
votes
1 answer

Fancybox script fails if load with getScript

I have to create a webshop that can be integrated into any external webpage. (Like Ecwid.) To do this, I have to create an array, where I list the scripts name, that have to be included/executed. In that list, there is fancybox, like other plugins.…
Tóth Attila
  • 15
  • 1
  • 6
0
votes
0 answers

ShareThis script GET fails for one known computer

Issue is a failure to load ShareThis script. This has been tested without issue on 8 different computers. The one where the issue occurs is (of course) the client's laptop. Running Windows 8 the issue occurs in both Chrome and FireFox. Script is…
jerrygarciuh
  • 21,158
  • 26
  • 82
  • 139
0
votes
1 answer

AJAX not returning the whole script

I am trying to load a script using AJAX with the following: $.ajax({ type: 'POST', async: false, url: ROOT + 'Ajax', data: { call: 'this->loadJs', script: 'Activity2/js/buying.js' }, dataType: "script", …
imperium2335
  • 23,402
  • 38
  • 111
  • 190
0
votes
1 answer

PHP generated Javascript load via AJAX possible?

I need to load a dynamic created javascript with PHP. Is there any good solution to load javascript creating by PHP after some ajax requests finished? Thx in regards, i am searching for 2h in stackoverflow. if i call .ajax function where html/js…
Wykk
  • 812
  • 6
  • 12
0
votes
0 answers

Image slider inside (ajax) .load breaks

This is my first question on this forum and it relates to the .load element in ajax. Basically I have an unordered list in which the list items are clickable links:
0
votes
1 answer

Loading HTML using JQuery's getScript multiple times after the HTML is removed over and over

I have a SPA ( single page application ) programmed in HTML/JavaScript/JQuery/CSS Every time a navigation link is clicked the main div is loaded with a chunk of HTML/JavaScript/JQuery/CSS via the ajax command and the getScript function is used to…
kidalex
  • 1,437
  • 2
  • 12
  • 14
0
votes
1 answer

How to stop $.getScript() error message?

I simply call $.getSCript(location.href) and it gets the script properly, however if the file is not there (and that is what I am planning to do a lot) it prints an error GET (url) 500 (Internal Server Error) How to prevent that from happening? How…
babaleh
  • 1
  • 1
0
votes
1 answer

Injecting data into jQuery $.getScript call

I need to inject some extra data into $.getScript call, so it'll be availabe in ready handler, how do I do that? // since it's called in a loop I need pass context into read handler $.getScript(path, function (e2) { }; in regular event handlers I…
user1514042
  • 1,899
  • 7
  • 31
  • 57
0
votes
1 answer

How to add native javascript into `$.when`?

How can I add native javascript into $.when? I get an error for doing this below when I want to use for each inside $.when. Any ideas? var scripts = [ "ccommon.js", "ccommon2.js", "ccommon3.js" ]; $.when( // Via $.getScript. …
Run
  • 54,938
  • 169
  • 450
  • 748
0
votes
2 answers

JavaScript - loading scripts order

I am developing an HTML+JavaScript application for Android OS. In the HTML page I am loading another JS file which has this code: var Map = {}; $.getScript("cordova-2.6.0.js",function(){ Map['x'] = somthin } At the HTML page I am looping through…
RRR
  • 3,937
  • 13
  • 51
  • 75