Opdatering af 2 frames ved anvendelse af browsers \"back-knap\"
Jeg har et problem med en side. Jeg har lavet et site, der grundlæggende er bygget op over 2 framesets.(cols.htm og rows.htm). I framesettet rows hentes bla. siderne menu.htm (i framen \"bottom\")og logotop.htm (i framen \"topframe\"). Endvidere hentes main.htm (i framen \"mainarea\"). Fra menuen kan siderne i \"mainarea\" skiftes samtidig med at siden i \"topframe\" skiftes. Problemet er, at de forskellige frames opdateres fint, når man bruger de forskellige menuknapper, men hvis man anvender browserens \"back\" knap, ja så er det kun \"mainarea\" der \"opdateres\", mens \"topframe\" ikke bliver det. Dette er ret uheldigt, da \"topframe\" anvendes til overskrift for \"mainarea\". Siden ser ud som nedenstående:<html>
<head>
<title>Menu</title>
<script language=\"JavaScript\" src=\"javascripts/imageswap.js\">
</script>
</head>
<body background=\"grafik/baggrund_blaa.gif\">
<table align=\"center\" width=\"760\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
<tr>
<td colspan=\"8\" height=\"5\"></td>
</tr>
<tr>
<onLoad=\"MM_preloadImages(\'grafik/menugrafik/oversigtO.gif\',\'grafik/menugrafik/herreO.gif\',\'grafik/menugrafik/bruunetteO.gif\',\'grafik/menugrafik/barnO.gif\',\'grafik/menugrafik/netbutikO.gif\',\'grafik/menugrafik/tilbudO.gif\',\'grafik/menugrafik/historieO.gif\',\'grafik/menugrafik/kontaktO.gif\')\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">
<table cellspacing=0 border=0 cellpadding=0>
<td><a href=\"#\" onClick=\"parent.topframe.location=\'toplogoer/logo_oversigt.htm\'; window.location=\'toplogoer/logo_oversigt.htm\';parent.mainarea.location=\'oversigt.htm\';window.location=\'oversigt.htm\'; parent.bottom.location=\'menu.htm\';window.location=\'menu.htm\'\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage(\'Oversigt\',\'\',\'grafik/menugrafik/oversigtO.gif\',1)\"><img name=\"Oversigt\" border=\"0\" src=\"grafik/menugrafik/oversigt.gif\" width=\"95\" height=\"18\" ></a></td>
<td><a href=\"#\" onClick=\"parent.topframe.location=\'toplogoer/logo_herre.htm\'; window.location=\'toplogoer/logo_herre.htm\';parent.mainarea.location=\'herre.htm\';window.location=\'herre.htm\';parent.bottom.location=\'menu.htm\';window.location=\'menu.htm\'\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage(\'Herretøj\',\'\',\'grafik/menugrafik/herreO.gif\',1)\"><img name=\"Herretøj\" border=\"0\" src=\"grafik/menugrafik/herre.gif\" width=\"95\" height=\"18\"></a></td>
<td><a href=\"#\" onClick=\"parent.topframe.location=\'toplogoer/logo_bruunette.htm\'; window.location=\'toplogoer/logo_bruunette.htm\';parent.mainarea.location=\'bruunette.htm\';window.location=\'bruunette.htm\'; parent.bottom.location=\'menu.htm\';window.location=\'menu.htm\'\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage(\'Bruunette\',\'\',\'grafik/menugrafik/bruunetteO.gif\',1)\"><img name=\"Bruunette\" border=\"0\" src=\"grafik/menugrafik/bruunette.gif\" width=\"95\" height=\"18\"></a></td>
<td><a href=\"#\" onClick=\"parent.topframe.location=\'toplogoer/logo_junior.htm\'; window.location=\'toplogoer/logo_junior.htm\';parent.mainarea.location=\'junior.htm\';window.location=\'junior.htm\'; parent.bottom.location=\'menu.htm\';window.location=\'menu.htm\'\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage(\'Boys&Girls\',\'\',\'grafik/menugrafik/barnO.gif\',1)\"><img name=\"Boys&Girls\" border=\"0\" src=\"grafik/menugrafik/barn.gif\" width=\"95\" height=\"18\"></a></td>
<td><a href=\"#\" onClick=\"parent.topframe.location=\'toplogoer/logo_netbutik.htm\'; window.location=\'toplogoer/logo_netbutik.htm\';parent.mainarea.location=\'netbutik/netbutik.asp\';window.location=\'netbutik/netbutik.asp\'; parent.bottom.location=\'menu.htm\';window.location=\'menu.htm\'\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage(\'Netbutik\',\'\',\'grafik/menugrafik/netbutikO.gif\',1)\"><img name=\"Netbutik\" border=\"0\" src=\"grafik/menugrafik/netbutik.gif\" width=\"95\" height=\"18\"></a></td>
<td><a href=\"#\" onClick=\"parent.topframe.location=\'toplogoer/logo_tilbud.htm\'; window.location=\'toplogoer/logo_tilbud.htm\';parent.mainarea.location=\'tilbud.htm\';window.location=\'tilbud.htm\'; parent.bottom.location=\'menu.htm\';window.location=\'menu.htm\'\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage(\'Tilbud\',\'\',\'grafik/menugrafik/tilbudO.gif\',1)\"><img name=\"Tilbud\" border=\"0\" src=\"grafik/menugrafik/tilbud.gif\" width=\"95\" height=\"18\"></a></td>
<td><a href=\"#\" onClick=\"parent.topframe.location=\'toplogoer/logo_historie.htm\'; window.location=\'toplogoer/logo_historie.htm\';parent.mainarea.location=\'historie/historie.htm\';window.location=\'historie/historie.htm\'; parent.bottom.location=\'menu.htm\';window.location=\'menu.htm\'\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage(\'Historie\',\'\',\'grafik/menugrafik/historieO.gif\',1)\"><img name=\"Historie\" border=\"0\" src=\"grafik/menugrafik/historie.gif\" width=\"95\" height=\"18\"></a></td>
<td><a href=\"#\" onClick=\"parent.topframe.location=\'toplogoer/logo_kontakt.htm\'; window.location=\'toplogoer/logo_kontakt.htm\';parent.mainarea.location=\'kontakt/kontakt.asp\';window.location=\'kontakt/kontakt.asp\'; parent.bottom.location=\'menu.htm\';window.location=\'menu.htm\'\" onMouseOver=\"MM_swapImage(\'Kontakt\',\'\',\'grafik/menugrafik/kontaktO.gif\',1)\"><img name=\"Kontakt\" border=\"0\" src=\"grafik/menugrafik/kontakt.gif\" width=\"95\" height=\"18\"></a></td>
</tr>
</table>
</body>
Siden indeholder som vist også en funktinalitet med preload af nogle billeder i forbindelse med en mouseover (men alt dette virker) - det er kun problemet med \"back\" der spøger!!!
