0

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 Safari.

I'm getting an error:

loadTestComponents is undefined

$.getScript(getParameterByName('srURL') + '/example.js', function(data, textStatus, jqxhr) {
 console.log(textStatus); // Success
 console.log(jqxhr.status); // 200
 console.log("Load was performed.");
 console.log(data);
 loadTestComponents();
});
Rory McCrossan
338k41 gold badges322 silver badges353 bronze badges
asked Jun 9, 2021 at 20:19
2
  • Does this answer your question? Safari iOS not loading Javascript file? Commented Jun 9, 2021 at 20:33
  • in my case it is loading the script. console.log(data) shows the function. but when invoke it, its not recognised Commented Jun 9, 2021 at 20:47

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.