I’ve googled to death and wondering if this could be firefox bug… but most likely it’s just my own stupid mistake.
Basically, I have a multiple “div” layer that contains “iframe”. Eventually, I will implement “back” and “forward” buttons on each of those layer. Naturally, when the user clicks “back” button/link it will go back to previous page of a specific iframe… however… this is a lot harder than it seems.
<html>
<head>
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<title>Stupid Test</title>
</head>
<body scroll="no" class=" ext-gecko ext-gecko3" id="ext-gen20">
<iframe frameborder="0" focusonload="true" id="google" name="google" class=" ux-mif" style="overflow: hidden; width: 1098px; height: 798px;" src="http://www.google.com"></iframe>
<iframe frameborder="0" focusonload="true" id="yahoo" name="yahoo" class=" ux-mif" style="overflow: hidden; width: 1098px; height: 798px;" src="http://www.yahoo.com"></iframe>
</body>
</html>
So above are over simplified version of my code. After you browse few of the links on both iframes… on firebug run the following multiple time
window.frames[‘google’].history.go(-1);
You’ll notice that your “yahoo” iFrame also goes “back” as well!!! What is going on? Isn’t this the right way to access iframe history?