I
iporter
Hi, throw the following example into a text file, save with an ASP
extension, and execute it in IIS6/7. Can anyone explain why Test 1
works fine, and Test 2 doesn't? Is it something to do with variable
scope?
Thanks,
Iain
<%@ language="javascript"%>
<script type="text/javascript" language="JScript" runat="server">
function myFunction() {return 'Hello Functional World'};
var myVariable = 'Hello Variable World';
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>Test</title>
</head>
<body>
<% Response.Write('Test 1: ' + myFunction());%>
<br />
<% Response.Write('Test 2: ' + myVariable);%>
</body>
</html>
extension, and execute it in IIS6/7. Can anyone explain why Test 1
works fine, and Test 2 doesn't? Is it something to do with variable
scope?
Thanks,
Iain
<%@ language="javascript"%>
<script type="text/javascript" language="JScript" runat="server">
function myFunction() {return 'Hello Functional World'};
var myVariable = 'Hello Variable World';
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>Test</title>
</head>
<body>
<% Response.Write('Test 1: ' + myFunction());%>
<br />
<% Response.Write('Test 2: ' + myVariable);%>
</body>
</html>