Log in

View Full Version : Very odd behaviour



wanapitei
02-22-2008, 08:54 PM
The coding for the links on this jump page (http://www.morleychalmers.com/MostlyTheravada/thePortal/thePortal.html) are identical, except for the behaviour differs of three of them. The Library, The Archives, Links and Search This Site all work fine. But when the user clicks on the other three, Glossary, Bibliography and Finding a Teacher, here's what happens. The browser processes the proper link and then a second call is made to the original page, causing the page to blink and redraw without change.

I've tried absolute addressing and that also doesn't work. Same phenomena in both the Safari and FireFox browsers on a Mac.

Oddest of all, when I attempt to go directly to one of these pages, for instance, placing the full address in both browsers, http://www.morleychalmers.com/MostlyTheravada/thePortal/bibliography.html, this also bounces back to the original page. But when I tested the above link when previewing this posting, it did work. So I know the address is correct and the page is indeed there. Having successfully gone to the page, I now copy the URL in the browser, create a new browser window, paste the URL, click enter, only to find the page bounces back. Very strange.

Anyone spot what I'm missing? Appreciated.

TimFA
02-23-2008, 04:12 PM
Can we see Glossary.html and the others? Humor me and you win a prize! Lol, just kidding. I don't see anything that stands out, but please do post the pages content.

Tim

jscheuer1
02-23-2008, 04:34 PM
Can we see Glossary.html and the others? Humor me and you win a prize! Lol, just kidding. I don't see anything that stands out, but please do post the pages content.

Tim

They are available online, no need to clutter up a post with the code.

I'd try getting rid of this (from portalMenuItems.js):


//Set variable for the Back menu item.

var back1=history.go(-1);

or changing it to a string:


//Set variable for the Back menu item.

var back1='history.go(-1);';

Perhaps even making it (I think this would be the best):


//Set variable for the Back menu item.

var back1='javascript:history.go(-1);';

But, where it is used should then be:


["Go Back", back1, ""],

TimFA
02-23-2008, 04:48 PM
I couldn't find them? How am I supposed to view them I was being thrown back...I guess to turn off JavaScript never occurred to me.

wanapitei
02-23-2008, 07:18 PM
As recommended by John Scheuer, I've made two changes to the portalMenuItems.js file.



//Set variable for the Back menu item.
var back1='javascript:history.go(-1);';

But, where it is used should then be:


["Go Back", back1, ""],

These two changes resolve the problem. I haven't the foggiest idea why just three of the items failed and the others worked. The only pattern I could perceive is that bibliography.html, glossary.html and findingATeacher.html are all higher alphabetically than the rest.

At any rate everything now works and the code is likely more robust.

Much thanks, all.

jscheuer1
02-23-2008, 07:39 PM
The difference was that the 'problem' pages had that menu associated with them. The 'good' pages did not.