WebWorks Help 5.0 - Search
From Marcus Baake via wwp-users:
after upgrading my stationery from version 2011.2 to 2011.4 the search function of my merged help system is behaving strangely. When I enter a search term and click the "Go!" button, the help system sometimes gets stuck at "Loading data...", i.e. it does not display any search results. when I click the "Go!" button a second or third time, the results are displayed almost instantly. I do not get any JS runtime errors, so I do not know what is going on, i.e. whether the search is stuck in an endless loop, or whether it stopped before any results are found. does anybody also experience this...?
After some more playing around with the search I found out that the first two clicks on the "Go!" button always fail, while the third click always works. Strange...
Workaround
Override to correct this issue: Formats.zip
Creates an override for panels.js at:
Formats\WebWorks Help 5.0\Files\wwhelp\wwhimpl\js\scripts\panels.js
Details
Issue relates to this reference failure. Error is soft in that clicking "Go!" multiple times enables the search, but no JavaScript errors or warnings are displayed.
Correcting it involves recording the correct this reference before invoking the reload view action.
Change From:
function WWHPanels_ReloadView() { WWHFrame.WWHBrowser.fValidateFrameReference(WWHFrame.WWHHelp.fGetFrameReference("WWHPanelViewFrame"), function () { var ExtraAction; var VarPanelViewFrameReference; var VarPanelViewFrame; if ( ! this.mbLoading) { // Save scroll position // this.fSaveScrollPosition(); // Set flag // this.mbLoading = true; // Close down any popups we had going to prevent JavaScript errors // this.mPopup.fHide(); // Get frame reference //
Change To:
Declared var VarPanels = this;
Replaced this. with VarPanels.
function WWHPanels_ReloadView() { var VarPanels = this; WWHFrame.WWHBrowser.fValidateFrameReference(WWHFrame.WWHHelp.fGetFrameReference("WWHPanelViewFrame"), function () { var ExtraAction; var VarPanelViewFrameReference; var VarPanelViewFrame; if ( ! VarPanels.mbLoading) { // Save scroll position // VarPanels.fSaveScrollPosition(); // Set flag // VarPanels.mbLoading = true; // Close down any popups we had going to prevent JavaScript errors // VarPanels.mPopup.fHide(); // Get frame reference //