Hi all
I have a history.back() problem with FF(2). IE works as expected, while FF
does not. The multi frame website setup as a whole with a lot of frame
content switching works flawlessly in both browsers. In one situation and
frame I have a long scrollable list of cars offered for sale. Some list
lines are linked to a separate page with images, to be loaded into the
same frame as the listing.
On closing this image page with <a href="javascript:history.back();">
Button.gif</a>, the listing reappears, maintaining the former vertical
position and showing the corresponding line in the same place where the
visitor started from (as opposed to the listing reverting to the top).
This appears to the visitor as a sleek operation and I think is essential.
Now, some cars have 2 or more images, implemented as rollover with <a
href="#" onClick= "change();">Close.gif</a- and with this, the problem
starts.
This are the two involved functions:
var b1, b2, b3
function LoadImages() { // onLoad
b2 = new Image(); b2.src = "image_2.jpg";
b3 = new Image(); b3.src = "image_3.jpg";
b1 = new Image(); b1.src = "image_1.jpg";
}
var n = 3
var i = 1
function change() {
i = i + 1;
if (i == (n+1)) i = 1;
img = "b" + i + ".src";
document.placeholder.src = eval(img); return false
}
In IE, this works consistently with one only or more images. In FF
however, the return history.back() shows a peculiar attitude. With single
image pages or multi image pages - but without actuating the rollover - FF
returns as expected with a single click. But after actuating the rollover,
FF requires a double click. As this is inconsistent and wholly unexpected,
it appears to the visitor as a bug and as "does not work properly".
For days I trial-and-errored a work-around, but to no avail, even with
separate code using navigator.appName. It has nothing to do with focus, as
moving focus around with (Shift)/Tab has no influence. My code appears to
me as straight forward and without any apparent interference between
change and close. The peculiar FF behaviour applies even to the original
back button of FF itself. So it looks like some kind of "lock in the FF
engine" - if possible at all.
I don't mind supplying more code and url, if you find it useful. But for
now I would like to ask for a first opinion - and probably even snag and
work-around are known to professionals (which I'm not).
Very many thanks for your consideration and possible help.
Heinrich Wolf