Sanitize filenames (in a unified manner) before using in Content-Disposition header
[phpmyadmin/crack.git] / js / querywindow.js
blobba9fe6e18f83d4ddfda32eab417a75b459ca2787
1 function PMA_queryAutoCommit()
3     document.getElementById('sqlqueryform').target = window.opener.frame_content.name;
4     document.getElementById('sqlqueryform').submit();
5     return;
8 function PMA_querywindowCommit(tab)
10     document.getElementById('hiddenqueryform').querydisplay_tab.value = tab;
11     document.getElementById('hiddenqueryform').submit();
12     return false;
15 function PMA_querywindowSetFocus()
17     document.getElementById('sqlquery').focus();
20 function PMA_querywindowResize()
22     // for Gecko
23     if (typeof(self.sizeToContent) == 'function') {
24         self.sizeToContent();
25         //self.scrollbars.visible = false;
26         // give some more space ... to prevent 'fli(pp/ck)ing'
27         self.resizeBy(10, 50);
28         return;
29     }
31     // for IE, Opera
32     if (document.getElementById && typeof(document.getElementById('querywindowcontainer')) != 'undefined') {
34         // get content size
35         var newWidth  = document.getElementById('querywindowcontainer').offsetWidth;
36         var newHeight = document.getElementById('querywindowcontainer').offsetHeight;
38         // set size to contentsize
39         // plus some offset for scrollbars, borders, statusbar, menus ...
40         self.resizeTo(newWidth + 45, newHeight + 75);
41     }