This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fooNamespace.foo = 'Not yet set.'; | |
fooNamespace.setFoo = function(bar) | |
{ | |
fooNamespace.foo=bar; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fooNamespace.outputFoo = function() | |
{ | |
alert(fooNamespace.foo); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Ajax JavaScript Includer</title> | |
<script type='text/javascript' src='jquery-1.3.2.min.js'></script> | |
<script type='text/javascript'> | |
//We have to declare a global object that we will use as a namespace for storing | |
//the eval loaded functions and variables, otherwise they will only exist within | |
//the scope of the ajax response function, which is be useless. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Ajax JavaScript Loader</title> | |
<script type='text/javascript' src='jquery-1.3.2.min.js'></script> | |
<script type='text/javascript'> | |
//Sadly internalFunction can not be accessed here, only with the scope of the | |
//success function in which it was created using eval(); | |
function nonScope() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Ajax JavaScript Loader</title> | |
<script type='text/javascript' src='jquery-1.3.2.min.js'></script> | |
<script type='text/javascript'> | |
//Sadly internalFunction can not be accessed here, only with the scope of the | |
//success function in which it was created using eval(); | |
function nonScope() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var foo = 'test'; | |
function setFoo(bar) | |
{ | |
foo=bar; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function outputFoo() | |
{ | |
alert(foo); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Ajax JavaScript Includer</title> | |
<script type='text/javascript' src='jquery-1.3.2.min.js'></script> | |
<script type='text/javascript'> | |
//The list of loaded resources. | |
var loaded = new Array(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function internalFunction() | |
{ | |
alert("Success."); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Ajax JavaScript Loader</title> | |
<script type='text/javascript' src='jquery-1.3.2.min.js'></script> | |
<script type='text/javascript'> | |
$.ajax({type: "GET", | |
url: "1_loader.js", | |
success: function(responseText) | |
{ |
NewerOlder