From 9918b9a2e9260012940500c5c5fcebac7657a11b Mon Sep 17 00:00:00 2001 From: "chanial%noos.fr" Date: Thu, 27 Feb 2003 18:53:51 +0000 Subject: [PATCH] Bug 192447: correctly disable the Advanced button when js is disabled. original patch by norority. --- browser/components/prefwindow/content/pref-features.js | 8 +++++--- browser/components/prefwindow/content/pref-features.xul | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/browser/components/prefwindow/content/pref-features.js b/browser/components/prefwindow/content/pref-features.js index ab2facb83189..bbf145a0e2c1 100644 --- a/browser/components/prefwindow/content/pref-features.js +++ b/browser/components/prefwindow/content/pref-features.js @@ -51,6 +51,7 @@ function Startup() var imagesEnabled = document.getElementById("enableImages").checked; var imageBroadcaster = document.getElementById("imageBroadcaster"); imageBroadcaster.setAttribute("disabled", !imagesEnabled); + javascriptEnabledChange() } function viewImages() @@ -65,10 +66,11 @@ function advancedJavaScript() "chrome,modal"); } -function javascriptEnabledChange(aEnable){ - var label = document.getElementById("allowScripts"); +function javascriptEnabledChange() +{ + var isEnabled = document.getElementById("enableJavaScript").checked; var advancedButton = document.getElementById("advancedJavascript"); - advancedButton.disabled = aEnable; + advancedButton.disabled = !isEnabled; } function togglePermissionEnabling() diff --git a/browser/components/prefwindow/content/pref-features.xul b/browser/components/prefwindow/content/pref-features.xul index 9ec6d9f23a53..5749ee2c7b69 100644 --- a/browser/components/prefwindow/content/pref-features.xul +++ b/browser/components/prefwindow/content/pref-features.xul @@ -89,7 +89,7 @@ + oncommand="javascriptEnabledChange();"/>