| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | |
| <html> | |
| <head> | |
| <script src="../../fast/js/resources/js-test-pre.js"></script> | |
| </head> | |
| <body> | |
| <p id="description"></p> | |
| <div id="console"></div> | |
| <form action="javascript: failTest(this)" method="get"> | |
| <input id="button1" type="submit" formaction="javascript: passTest1(this)" /> | |
| <button id="button2" type="submit" formaction="javascript: passTest2(this)" /> | |
| </form> | |
| <script> | |
| description("Test for formaction attributes in input and button tags."); | |
| var doneAction = false; | |
| var doneAction2 = false; | |
| function failTest(ul) | |
| { | |
| doneAction = true; | |
| testFailed('The formaction attribute in the input or button tag was ignored.'); | |
| } | |
| function passTest1(ul) | |
| { | |
| doneAction = true; | |
| testPassed('The formaction attribute in the input tag was used.'); | |
| } | |
| function passTest2(ul) | |
| { | |
| doneAction = true; | |
| testPassed('The formaction attribute in the button tag was used.'); | |
| } | |
| doneAction = false; | |
| var input = document.getElementById('button1'); | |
| input.click(); | |
| if (!doneAction) | |
| testFailed('Both of the action and the formaction attributes were ignored.'); | |
| doneAction = false; | |
| var button = document.getElementById('button2'); | |
| button.click(); | |
| if (!doneAction) | |
| testFailed('Both of the action and the formaction attributes were ignored.'); | |
| </script> | |
| <script src="../../fast/js/resources/js-test-post.js"></script> | |
| </body> | |
| </html> |