var qb_tables = new Array(); var qb_conditions = new Array(); function qb_saveQuery(pType){ var s_title = html_GetElement("P1002_QUERY_NAME").value; if (isEmpty("P1002_QUERY_NAME")) { html_GetElement("P1002_QUERY_NAME").value = ''; html_GetElement("P1002_QUERY_NAME").focus(); return; } // test to be sure name is unique var sId = html_GetElement("P1002_QUERY_ID").value; if (sId == null || sId == '') { var get = new htmldb_Get(null,4500,'INTERNAL_APPLICATION_PROCESS=266120031373725934',0); get.add('P1002_QUERY_NAME',s_title); var isUniq = get.get(); if (isUniq != '0') { html_GetElement("htmldbMessageHolder").innerHTML = isUniq; return; } } qb_tables = new Array(); qb_conditions = new Array(); var lRet = qb_getQueryAttribs(pType); if (lRet) { qb_hidePopup(); html_GetElement("htmldbMessageHolder").innerHTML = ''; html_enableBase(); // html_GetElement("P1002_DIS_NAME").innerHTML = html_GetElement("P1002_QUERY_NAME").value; html_TabClick(html_GetElement("SavedSql_tab"),'SavedSQLHolder'); // gQbFind = html_GetElement("P1002_QUERY_NAME").value; qb_getSavedSQL(); } } function qb_saveTable(oid,cnt,top,left,tname) { qb_tables.push(this); this.object_id = oid; this.count = cnt; this.top = top; this.left = left; this.table = tname; } function qb_saveConditions(c,a,fv,fp,o,st,so,g,con) { qb_conditions.push(this); this.col = c; this.alias = a; this.func_value = fv; this.func_paren = fp; this.out = o; this.sort_type = st; this.sort_order = so; this.group_by = g; this.condition = con; } function qb_getQueryAttribs(pType) { var tableDiv = document.getElementById("qbTableHolder"); var t = tableDiv.getElementsByTagName('DIV'); for(var i=0;i'; html_GetElement("htmldbMessageHolder").innerHTML = pMessage; return false; } var d=document.getElementsByTagName('INPUT'); for(var i=0;i