initial commit
[emacs-init.git] / nxhtml / tests / in / asp.asp
1
2 <%@LANGUAGE="VBScript"%>
3
4 <SCRIPT LANGUAGE="JavaScript" RUNAT="Server">
5 function JSGreeting()
6         {
7         return "Greetings from a JavaScript Function";
8         }
9 </SCRIPT>
10
11 <SCRIPT LANGUAGE="VBScript" RUNAT="Server">
12 Function VBGreeting()
13         VBGreeting="Greetings from a VBScript Function"
14 End Function
15
16 Function toDollars(x)
17         toDollars=FormatCurrency(x)
18 End Function
19 </SCRIPT>
20
21 <%
22 var a = 2;
23 var b = 2;
24 var c = add(a,b)
25 c += " (Two numbers are added by JavaScript, "
26 c += "and then formatted into currency by VBScript.)"
27
28 function add(x,y)
29         {
30         result = x + y;
31         result = toDollars(result);
32         return result;  
33         }
34
35 Response.Write("<HTML>\r")
36 Response.Write(JSGreeting() + "<BR>\r")
37 Response.Write(VBGreeting() + "<BR>\r")
38 Response.Write(c + " <BR>\r")
39 Response.Write("</HTML>\r")
40 %>