Toon posts:

javascript en history...

Pagina: 1
Acties:
  • 120 views sinds 30-01-2008
  • Reageer

Verwijderd

Topicstarter
Ik heb in een page een

if(window != top)
{ parent.frames[0].location.href="http://...";
}

funksietjes staan om het juiste bovenframe in te laden.
Het probleem is alleen dat als ik het op deze manier doe, je 2 keer op je 'back-button' moet klikken om naar de vorige pagina te gaan.
Is het dus mogelijk om bovenstaande handeling niet door je history te laten registreren of zoiets?

  • Annie
  • Registratie: Juni 1999
  • Laatst online: 25-11-2021

Annie

amateur megalomaan

met de replace method van location wordt de url niet aan de history toegevoegd, maar in plaats van de vorige in de historylist gezet.
Dus:

parent.frames[0].location.replace("link.html");

Today's subliminal thought is:


Verwijderd

Topicstarter
Bedankt,werkt perfect! :)

Verwijderd

Topicstarter
Nog een vraagje:

kan ik

if(window != top)
{ parent.frames[0].location.replace("http://...");
}


NA de body plaatsen (dus in de body, net achter de <body> tag)? Hierdoor laadt ie sneller, ik vraag me alleen af of dat wel compatible is met oudere browsers...

Ik heb een keer geprobeerd mijn dhtml-menu binnen de body aan te roepen en dat ging bij oudere browsers niet goed. Maar dat ging met een function-call, navbarInit();....

  • Annie
  • Registratie: Juni 1999
  • Laatst online: 25-11-2021

Annie

amateur megalomaan

kweetniet of dat mag (lijkt mij van wel). Wat ik wel weet is dat de replace vanaf NS3 werkt. Onderstaand stukje vond ik op DevEdge:
Description
The replace method loads the specified URL over the current history entry. After calling the replace method, the user cannot navigate to the previous URL by using browser's Back button.
If your program will be run with JavaScript in Navigator 2.0, you could put the following line in a SCRIPT tag early in your program. This emulates replace, which was introduced in Navigator 3.0:


if (location.replace == null) location.replace = location.assign

Today's subliminal thought is: