~zulcss/samba/server-dailies-3.4

« back to all changes in this revision

Viewing changes to swat2/esptest/exception.esp

  • Committer: Chuck Short
  • Date: 2010-09-28 20:38:39 UTC
  • Revision ID: zulcss@ubuntu.com-20100928203839-pgjulytsi9ue63x1
Initial version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<% page_header("columns", "ESP Exception test", "esptest"); 
 
2
   include("/scripting/forms.js");
 
3
%>
 
4
 
 
5
<h1>Samba4 exception test</h1>
 
6
 
 
7
 
 
8
<%
 
9
var f = FormObj("ExceptionTest", 0, 2);
 
10
f.submit[0] = "Generate Exception";
 
11
f.submit[1] = "No Exception";
 
12
 
 
13
f.display();
 
14
 
 
15
if (request['REQUEST_METHOD'] == "POST") {
 
16
        function TestFunction(arg1, arg2) {
 
17
                 return "OK";
 
18
        }
 
19
 
 
20
        if (form['submit'] == "Generate Exception") {
 
21
            write("I expect you to die Mr Bond!<br>\n");
 
22
            TestFunction("foo");
 
23
        } else {
 
24
            write("no exception<br>\n");
 
25
            TestFunction("foo", "bar");
 
26
        }
 
27
}
 
28
%>
 
29
 
 
30
and here is some filler text ...
 
31
 
 
32
<% page_footer(); %>