diff --git a/xpfe/browser/src/navigator.xul b/xpfe/browser/src/navigator.xul index 4fca75d007a..0714a7264c6 100644 --- a/xpfe/browser/src/navigator.xul +++ b/xpfe/browser/src/navigator.xul @@ -117,14 +117,31 @@ } // Enable/Disable the Forward menu - + var fm = document.getElementById("menuitem-forward"); + if (!fm) { + dump("Couldn't obtain menu item Forward\n"); + return; + } + else + dump("Got a handle to forward menu item\n"); + + // Enable/Disable the Forward Menuitem + if (canForward == "true") { + dump("Setting forward menu item disabled\n"); + fm.setAttribute("disabled", "true"); + } + else { + dump("Setting forward menu item enabled\n"); + fm.setAttribute("disabled", ""); + } + } function BrowserSetBack() { var backBElem = document.getElementById("canGoBack"); if (!backBElem) { - dump("Couldn't obtain handle to back Broarcast element\n"); + dump("Couldn't obtain handle to back Broadcast element\n"); return; } @@ -145,6 +162,24 @@ } // Enable/Disable the Back menu + var bm = document.getElementById("menuitem-back"); + if (!bm) { + dump("Couldn't obtain menu item Back\n"); + return; + } + else + dump("Obtained MenuItem Back\n"); + + // Enable/Disable the Back Menuitem + if (canBack == "true") { + dump("Setting Back menuitem to disabled\n"); + bm.setAttribute("disabled", "true"); + } + else { + dump("Setting Back menuitem to enabled\n"); + bm.setAttribute("disabled", ""); + } + } @@ -623,8 +658,8 @@ - - + +