| Last change
 on this file since 720 was             414, checked in by Herwig Bauernfeind, 16 years ago | 
        
          | 
Samba 3.5.0: Initial import
 | 
        
          | File size:
            621 bytes | 
      
      
| Line |  | 
|---|
| 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(); %> | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.