187 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
316
views
Exception in external script not showing on console
I'm making a small library to be used on browser and came across (what I think of as) a strange behaviour of throw.
When I run this code:
var SomeClass = function() {};
SomeClass.prototype.error = ...
0
votes
0
answers
89
views
Change the file type when downloading Is Asp.Net Core 5
I have two files with js extension that need to be downloaded one after the other in one view. The problem that has is that I in Debug mode, after I publish from the desired file and put it in IIS, ...
0
votes
0
answers
115
views
jquery getscript() and const variables (possibly scope issue)
Why in this example i get Uncaught ReferenceError: CONST1 is not defined
consts.js
const CONST1 = "hello";
sample.js
jQuery.getScript("consts.js', function() {
alert(CONST1);
});
...
0
votes
1
answer
289
views
How to use jQuery in global imported functions without jQuery.ready
my code in JS is getting very large right now and so I wanted to outsource sections to other files, for clarity.
In my main file I use
jQuery(document).ready(function ($) {
$.getScript("/wp-...
0
votes
0
answers
149
views
$.getScript error in iOS Safari - works in Chrome
I am loading a static resource file through $.getScript as below. loadTestComponents is a function defined within the example.js file. This works as expected in Chrome but it's not working in iOS ...
0
votes
1
answer
64
views
Using External jQuery and JSON not working
I am looking to create multiple html files for each phone-brand with a common '.js' file and '.json' file. I am trying to replace the word ‘Brand’ in the common '.js' file with the respective brand ...
-1
votes
1
answer
82
views
My Dynamic Ajax site is overloaded with multiple getScript calls
I have a dynamic website where all links grab new sections via an ajax request from other pages and replace the current section.
My problem comes in two forms. When I load a new div from an Ajax get ...
0
votes
0
answers
183
views
Jquery $.getScript for fallback scripts does not work
How can I go about setting up a fallback script, using jQuery or any other method? Why does this method not work?
https://api.jquery.com/jQuery.getScript/#jQuery-getScript
I use the code below to set ...
0
votes
0
answers
107
views
How can I get a script from an external HTML file?
I am having troubles with getting script from an external HTML file. I have a file page1.php that sends AJAX requests to page2.php to get the following things:
several div elements to append them to ...
0
votes
0
answers
224
views
jQuery getScript to load external script and call function that relies on script not working
I have the following code to load an external script, I can see in the console network tab the script gets loaded but I get error:
Uncaught TypeError: $(...).pikaday is not a function
This is my ...
2
votes
1
answer
827
views
getScript, loading multiple scripts in series?
I am trying to load multiple .js files through the GetScript method.
I need them to be loaded in series, meaning the first .js files needs to be fully loaded before going to the next one.
Question 1: ...
1
vote
2
answers
181
views
Load scripts asynchronously using getScript
I want use function from path /js/testscript.js, /js/testscript.js is dependent from /script5.js, but testscript.js load after call $(this).testscript();
What am I doing wrong? Scripts are dependent.
...
2
votes
1
answer
1k
views
Uncaught TypeError: $.getScript(...).done is not a function
I faced a weird situation here..
.
Below code is working:
// this code working perfectly
$.getScript( "https://wchat.freshchat.com/js/widget.js" ).done(( script, textStatus )=>{
// run ...
0
votes
4
answers
4k
views
jQuery getScript not working, or I'm using it wrong
I'm having trouble getting jquery's $.getScript to work. Here's a test file, demo.html:
<!DOCTYPE html>
<script src="/xyz/scripts/jquery-1.11.0.min.js"></script>
<script>
...
1
vote
1
answer
1k
views
Load multiple script files with jQuery in order with deferred - combining two functions found
I try to modify the following function found on Stackoverflow to load multiple Scripts with jQuery.
$.getMultiScripts = function(arr, path) {
var _arr = $.map(arr, function(scr) {
return $...