Home | History | Annotate | Download | only in session_history
      1 <html>
      2 <head>
      3 <title>bot1</title>
      4 <script>
      5 // --- Convenience functions for testing.
      6 function setTitle() {
      7   var fbot = document.getElementById("fbot");
      8   document.title = fbot.contentDocument.title;
      9 }
     10 // Simulate the user clicking a link.
     11 function clickLink(name) {
     12   var ftop = document.getElementById("ftop");
     13   var node = ftop.contentDocument.getElementById(name);
     14   var evt = document.createEvent("MouseEvents");
     15   evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0,
     16 		     false, false, false, false, 0, null);
     17   node.dispatchEvent(evt);
     18 }
     19 // Simulate the user filling a form value.
     20 function fillForm(name, value) {
     21   var fbot = document.getElementById("fbot");
     22   var node = fbot.contentDocument.getElementById(name);
     23   node.value = value;
     24 }
     25 // Simulate the user clicking on the submit button.
     26 function submitForm(name) {
     27   var fbot = document.getElementById("fbot");
     28   var node = fbot.contentDocument.getElementById(name);
     29   node.click();
     30 }
     31 function init() {
     32   var fbot = document.getElementById("fbot");
     33   // This will set our title to the bottom frame, so we can test that
     34   // we actually navigated.
     35   fbot.onload = setTitle;
     36 }
     37 </script>
     38 </head>
     39 
     40 <frameset onLoad="init()" rows="20%,80%" name="main">
     41   <frame src="top.html" id="ftop" name="top">
     42   <frame src="bot1.html" id="fbot" name="bottom">
     43 </frameset>
     44 
     45 </html>
     46