Bug Tracker

Opened 6 years ago

Closed 6 years ago

#13830 closed bug (notabug)

getScript returning complex scripts

Reported by: flarebear Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 2.0.0
Keywords: Cc:
Blocked by: Blocking:

Description

The description of the problem is here (Ignore everything before "OK. Let's forget about MVC. Just using HTML...") :

Question on Stack Overflow

The example shows how I can run testscript.js in the usual way: src="scripts/testscript.js".

but

using getScript instead, to load testscript.js just makes it fall over. I've tried IE10, FF 20.0.1, Chr 26.0.1410.64 m

Debugging in Visual Studio suggests that the dynamic javascript generated in IE (after passing through getScript) is looking for window[ 'google '] but is undefined. Since testscript.js works ok when it is loaded in the conventional manner, it leads me to believe that getScript is doing something to it when I try to retrieve it with getScript.

Change History (1)

comment:1 Changed 6 years ago by dmethvin

Resolution: notabug
Status: newclosed

You were in the right place, Stack Overflow. It's not correct to pose a general question in the jQuery bug tracker. Looks to me like google.setOnLoadCallback(drawChart); is probably being called after the page loads, but again you should let the SO responders isolate it and decide whether it's an issue with jQuery, then create a simple test case.

Note: See TracTickets for help on using tickets.