navigator.userAgent.match("Opera") != null;
}
+function is_msie() {
+ return navigator.userAgent.match("MSIE");
+}
+
function is_opera() {
return navigator.userAgent.match("Opera");
}
}
}
-function showBlockElement(id) {
+function showBlockElement(id, h_id) {
var elem = document.getElementById(id);
if (elem) {
elem.style.display = "block";
+
+ if (h_id) {
+ elem = document.getElementById(h_id);
+ if (elem) {
+ elem.style.display = "none";
+ }
+ }
} else {
alert("[showBlockElement] can't find element with id " + id);
}
var query = Form.serialize("feed_add_form");
- xmlhttp.open("GET", "backend.php?" + query, true);
+ debug("subscribe q: " + query);
+
+/* xmlhttp.open("GET", "backend.php?" + query, true);
xmlhttp.onreadystatechange=dlg_frefresh_callback;
- xmlhttp.send(null);
+ xmlhttp.send(null); */
+
+ xmlhttp.open("POST", "backend.php", true);
+ xmlhttp.onreadystatechange=dlg_frefresh_callback;
+ xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+ xmlhttp.send(query);
return false;
}
}
function getInitParam(key) {
- var c = getCookie("TTIP:" + key);
- if (c) {
- return c;
- } else {
- return getMainContext().init_params[key];
- }
+ return init_params[key];
}
function storeInitParam(key, value) {
- try {
- init_params[key] = value;
- debug("storeInitParam: " + key + " => " + value +
- " (" + getInitParam("cookie_lifetime") + ")");
- if (getInitParam("cookie_lifetime") > 0) {
- setCookie("TTIP:" + key, value, getInitParam("cookie_lifetime"));
- } else {
- setCookie("TTIP:" + key, value);
- }
- } catch (e) {
- exception_error("storeInitParam", e);
- }
+ debug("<b>storeInitParam is OBSOLETE: " + key + " => " + value + "</b>");
}
-
-/*
-function storeInitParam(key, value, is_client) {
- try {
- if (!is_client) {
- if (getMainContext().init_params[key] != value) {
- debug("storeInitParam: " + key + " => " + value);
- //new Ajax.Request("backend.php?op=rpc&subop=storeParam&key=" +
- // param_escape(key) + "&value=" + param_escape(value));
- var f = getMainContext().document.getElementById("backReqBox");
- f.src = "backend.php?op=rpc&subop=storeParam&key=" +
- param_escape(key) + "&value=" + param_escape(value);
- }
- }
- getMainContext().init_params[key] = value;
- } catch (e) {
- exception_error("storeInitParam", e);
- }
-} */
-
-/*
-function storeInitParams(params, is_client) {
- try {
- var s = "";
-
- for (k in params) {
- if (getMainContext().init_params[k] != params[k]) {
- s += k + "=" + params[k] + ";";
- getMainContext().init_params[k] = params[k];
- }
- }
-
- debug("storeInitParams: " + s);
-
- if (!is_client) {
- new Ajax.Request("backend.php?op=rpc&subop=storeParams&str=" + s);
- }
- } catch (e) {
- exception_error("storeInitParams", e);
- }
-}*/
-
function fatalError(code, message) {
try {