[jQuery] getScript + google-maps = page locks up ?
<div dir="ltr">Well I lied a little but it's $.ajax ith the datatype set to script:
var _this = this;
var url = "<a href="http://maps.google.com/maps">http://maps.google.com/maps</a>";
var data = {
file:"api",
v:2,
key:"ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ"
};
$.ajax({
type : "get",
dataType: "script",
url : url,
data : data,
success : function(){
_this.debug("Loaded provider script %s.", url);
//Do stuff
},
error : function(xhr, status, e){
_this.warn("Failed to load base layer required scripts.");
}
});<br clear="all">
So everthing is fine and the script loads and I get to the successfull callback in firebug. However, the first line fails because an error is thown and indeed if I put 'watch' _this in the firebug watch panel, I see this message:
<span class="objectBox objectBox-exception">ReferenceError: __scope__ is not defined</span>
The page keeps spinning saying it loading <a href="http://maps.google.com">maps.google.com</a> but I can see the scripts are loaded in firebug. One other interesting wierdness is that the dom disappears, meaning the screen goes blank white and I can't see any info in the firebug html window.
Any thoughts?! I lost all day to this one...
Thanks
--
Christopher Thatcher
</div>