I am having issues with loading external javascript using JQuery. Every time when I try to load this external file, browser window becomes blank and in Firefox it redirects to something like:
wyciwyg://40/http://mydomain.com/myfile.html
What I am trying to do, is to load walkscore google map into one of div's on the page. I've tried using $.get() method, .load(), $.getScript() and $.requireScript() jquery plugin, and nothing works EXCEPT one case, when I put alert() right after the $.get() method. In this case browser is not redirected anywhere and walkscore map show up on the page.
This is my script in head section:
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
function loadWalkScore() { $.get("http://www.walkscore.com/tile/show-tile.php?wsid=87439b0626c9eaeacfd6d8d5598afc13",null,null,"script"); } </script>
Script in the body of the page:
<div id="contentArea" style="margin: 20px 0px 10px 10px; border: 1px solid #CCC;">
<script type="text/javascript">
var ws_lat = "40.710318";
var ws_lon = "-74.016553";
var ws_width = "630";
loadWalkScore();
</script>
</div>
Please also see all examples I have (only first one works):
// 1. $.get() - working example, has alert right after the $.get() method
websvit. com/tabs/walkscore-with-alert.html
// 2. $.get() - exactly the same as above without alert, doesnt work
websvit. com/tabs/walkscore-get.html
// 3. .load() - loading html file with walkscore js, doesnt work
websvit. com/tabs/walkscore-load.html
// 4. $.getScript() - doesnt work
websvit. com/tabs/walkscore-getscript-external.html
// 5. $.getScript() locally saved walkscore js, doesnt work
websvit. com/tabs/walkscore-getscript-local.html
// 6. $.requireScript() - using jquery plugin, doesnt work
websvit. com/tabs/walkscore-get-plugin.html