From 338b1dbdc90020d21d8db87f03e76a50dde93985 Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Wed, 21 Mar 2007 10:40:03 +0000 Subject: [PATCH] use id instead of name for accessing hidden query form in querywindow --- js/querywindow.js | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/js/querywindow.js b/js/querywindow.js index b69cdfaa4..6b92876ed 100644 --- a/js/querywindow.js +++ b/js/querywindow.js @@ -1,3 +1,10 @@ +/* vim: set expandtab sw=4 ts=4 sts=4: */ +/** + * functions used by and for querywindow + * + * @version $Id$ + */ + /** * holds the browser query window */ @@ -216,16 +223,16 @@ function reload_querywindow( db, table, sql_query ) { if ( ! querywindow.closed && querywindow.location ) { if ( ! querywindow.document.sqlform.LockFromUpdate || ! querywindow.document.sqlform.LockFromUpdate.checked ) { - querywindow.document.querywindow.db.value = db; - querywindow.document.querywindow.query_history_latest_db.value = db; - querywindow.document.querywindow.table.value = table; - querywindow.document.querywindow.query_history_latest_table.value = table; + querywindow.document.getElementById('hiddenqueryform').db.value = db; + querywindow.document.getElementById('hiddenqueryform').query_history_latest_db.value = db; + querywindow.document.getElementById('hiddenqueryform').table.value = table; + querywindow.document.getElementById('hiddenqueryform').query_history_latest_table.value = table; if ( sql_query ) { - querywindow.document.querywindow.query_history_latest.value = sql_query; + querywindow.document.getElementById('hiddenqueryform').query_history_latest.value = sql_query; } - querywindow.document.querywindow.submit(); + querywindow.document.getElementById('hiddenqueryform').submit(); } } } @@ -244,10 +251,10 @@ function focus_querywindow( sql_query ) { insertQuery(0); } else { //var querywindow = querywindow; - if ( querywindow.document.querywindow.querydisplay_tab != 'sql' ) { - querywindow.document.querywindow.querydisplay_tab.value = "sql"; - querywindow.document.querywindow.query_history_latest.value = sql_query; - querywindow.document.querywindow.submit(); + if ( querywindow.document.getElementById('hiddenqueryform').querydisplay_tab != 'sql' ) { + querywindow.document.getElementById('hiddenqueryform').querydisplay_tab.value = "sql"; + querywindow.document.getElementById('hiddenqueryform').query_history_latest.value = sql_query; + querywindow.document.getElementById('hiddenqueryform').submit(); querywindow.focus(); } else { querywindow.focus();