lbehnke / h2database

Automatically exported from code.google.com/p/h2database
0 stars 0 forks source link

Remove iframe check #197

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We try to integrate h2 console in our debug console application thanks to
an iframe but that's not possible because of the following code in h2
console JSP :

<script type="text/javascript">
        if(self != top) {
            top.location = "login.jsp";
        }
</script>

Could you remove this check ?

Original issue reported on code.google.com by bouiaw on 6 May 2010 at 9:18

GoogleCodeExporter commented 9 years ago
It's not so easy. The check was added for the following case:

- Start the H2 Console
- Login to a database
- Stop the H2 Console
- Start the H2 Console
- Press the 'Run (Ctrl+Enter)' button

If the check is disabled, the login will appear in the query result area 
instead of
the whole window.

To solve this problem, the Javascript could be changed to:

if(self != top) {
  if (self.name == 'h2result' 
        || self.name == 'h2query' 
        || self.name == 'h2menu') {
    top.location = "login.jsp";
  }
}

Does this solve your problem?

Original comment by thomas.t...@gmail.com on 9 May 2010 at 5:39

GoogleCodeExporter commented 9 years ago
Yes it does.

Original comment by bouiaw on 10 May 2010 at 8:03

GoogleCodeExporter commented 9 years ago
I have now committed the change.
It will be included in the next version
(in about two weeks).

Original comment by thomas.t...@gmail.com on 10 May 2010 at 8:18

GoogleCodeExporter commented 9 years ago
Thanks a lot !

Original comment by bouiaw on 10 May 2010 at 8:28

GoogleCodeExporter commented 9 years ago
This should be fixed now.

Original comment by thomas.t...@gmail.com on 24 May 2010 at 8:54