summaryrefslogtreecommitdiff
path: root/prefs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-11-26 11:06:56 +0100
committerAndrew Dolgov <[email protected]>2005-11-26 11:06:56 +0100
commit7719618b297400f5bdc44b1be47f969ec582fb47 (patch)
tree49bf70985ee61cd596ca35bdac6a874616b29017 /prefs.js
parentd6bf9d41928fd9ff41dde2d34f961a9ce1f8ec2a (diff)
exception handling in some code blocks
Diffstat (limited to 'prefs.js')
-rw-r--r--prefs.js54
1 files changed, 17 insertions, 37 deletions
diff --git a/prefs.js b/prefs.js
index 404602c33..b69369ba1 100644
--- a/prefs.js
+++ b/prefs.js
@@ -28,8 +28,8 @@ if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
}
function feedlist_callback() {
- var container = document.getElementById('prefContent');
if (xmlhttp.readyState == 4) {
+ var container = document.getElementById('prefContent');
container.innerHTML=xmlhttp.responseText;
if (active_feed) {
var row = document.getElementById("FEEDR-" + active_feed);
@@ -1146,45 +1146,25 @@ function selectTab(id) {
function init() {
- // IE kludge
-
- if (!xmlhttp) {
- document.getElementById("prefContent").innerHTML =
- "<b>Fatal error:</b> This program needs XmlHttpRequest " +
- "to function properly. Your browser doesn't seem to support it.";
- return;
+ try {
+
+ // IE kludge
+ if (!xmlhttp) {
+ document.getElementById("prefContent").innerHTML =
+ "<b>Fatal error:</b> This program needs XmlHttpRequest " +
+ "to function properly. Your browser doesn't seem to support it.";
+ return;
+ }
+
+ selectTab("genConfig");
+
+ document.onkeydown = hotkey_handler;
+ notify("");
+ } catch (e) {
+ exception_error("init", e);
}
-
- selectTab("genConfig");
-
- document.onkeydown = hotkey_handler;
- notify("");
-
}
-/*
-var help_topic_id = false;
-
-function do_dispOptionHelp() {
-
- if (!xmlhttp_ready(xmlhttp))
- return;
-
- xmlhttp.open("GET", "backend.php?op=pref-prefs&subop=getHelp&pn=" +
- param_escape(help_topic_id), true);
- xmlhttp.onreadystatechange=gethelp_callback;
- xmlhttp.send(null);
-
-}
-
-function dispOptionHelp(event, sender) {
-
- help_topic_id = sender.id;
-
-// document.setTimeout("do_dispOptionHelp()", 100);
-
-} */
-
function closeInfoBox() {
var box = document.getElementById('infoBox');
var shadow = document.getElementById('infoBoxShadow');