Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- inserting a variable into a function


Fotiman - 7:37 pm on Dec 4, 2012 (gmt 0)


The code, as you describe it, should work. I verified this with the following very simplistic base case:

<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<script src="external_file.js"></script>
<script>
function func1() {
func2();
}
function func3() {
alert('in func3');
}
func1();
</script>
</body>
</html>


// external
function func2() {
func3();
}


So perhaps something else is failing (and thus erroring out) before you think.


Thread source:: http://www.webmasterworld.com/javascript/4524548.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com