summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test/data/window_open.html
blob: 7708491140686ec72d431dc8a1960ec308d43035 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<html>
  <head>
    <title>window open</title>
    <script type="text/javascript">
      var new_window;

      function OnClick() {
        // Open popup to the url from the given query string.
        var url = window.location.search.substring(1);
        new_window = window.open(url, "_blank",
                                 "left=10, top=10, height=250, width=250");
      }

      function OnKeyPress() {
        var char_code = String.fromCharCode(event.keyCode);
        if (char_code == 'c') {
          new_window.close();
        }
      }
    </script>
  </head>
  <body onkeypress="OnKeyPress();" onclick="OnClick();">
    ChromeFrame full tab mode window open popup test
  </body>
</html>