|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 |
|
4 <head> |
|
5 </head> |
|
6 |
|
7 <body> |
|
8 |
|
9 <form id="subform1" onsubmit="return checkSubmit(21)"> |
|
10 <input id="subtest1" type="text" name="subtest1"> |
|
11 <button type="submit">Submit</button> |
|
12 </form> |
|
13 |
|
14 <form id="subform2" onsubmit="return checkSubmit(100)"> |
|
15 <input id="subtest2" type="text" name="subtest2"> |
|
16 <button type="submit">Submit</button> |
|
17 </form> |
|
18 |
|
19 <script> |
|
20 function checkSubmit(num) { |
|
21 netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); |
|
22 return parent.checkSubmit(num); |
|
23 } |
|
24 |
|
25 function clickButton(num) { |
|
26 if (num == 21) |
|
27 document.querySelectorAll("button")[0].click(); |
|
28 else if (num == 100) |
|
29 document.querySelectorAll("button")[1].click(); |
|
30 } |
|
31 |
|
32 // set the input's value (can't use a default value, as satchel will ignore it) |
|
33 document.getElementById("subtest1").value = "subtestValue"; |
|
34 document.getElementById("subtest2").value = "subtestValue"; |
|
35 </script> |
|
36 |
|
37 </body> |
|
38 </html> |