Toon posts:

Javascript openen in ander frame

Pagina: 1
Acties:
  • 37 views sinds 30-01-2008

Verwijderd

Topicstarter
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<html>
<head>
<script language='JavaScript'>
function jaaa()
{
window.parent.location='index.html';
}
</script>
</head>

<body>
<input value='flikkerop' type='button' onClick='jaaa();'>
</body>
</html>


Hoe kan ik het nu zo maken dat als er gedrukt wordt op 't knopje.. dat index.html in een ander frame geopend wordt dan 'parent'?

  • BtM909
  • Registratie: Juni 2000
  • Niet online

BtM909

Watch out Guys...

na parent nog ff de naam van het frame toevoegen
code:
1
parent.framenaam.location


En window hoeft niet vermeld te worden

Ace of Base vs Charli XCX - All That She Boom Claps (RMT) | Clean Bandit vs Galantis - I'd Rather Be You (RMT)
You've moved up on my notch-list. You have 1 notch
I have a black belt in Kung Flu.


Verwijderd

Basis javascript, dit kun je in iedere tutorial vinden.

parent.frames['framenaam'].location is trouwens beter imho, het geeft meer duidelijkheid, gaat minder snel fout, en is eenvoudiger om te bouwen als je een variabele framenaam gaat gebruiken.

Dit topic is gesloten.