[JS] URL opvragen in framepagina

Pagina: 1
Acties:

  • xentar
  • Registratie: Februari 2003
  • Laatst online: 18-09-2025
Ik heb dus een frameset met top en main met volgende code:
code:
1
2
3
4
<frameset rows='0,*' cols='*' frameborder='NO' border='0' framespacing='0'> 
    <frame name='iPowertopFrame' scrolling='NO' noresize src='dummy.htm'>
    <frame name='iPowermainFrame' src='http://users.multimedi.be/pieterreynders/xentar'>
</frameset>

Aan deze code kan ik dus niets wijzigen.

Nu wil ik in het mainframe de url opvragen die de bezoekers hebben ingetypt.
Mijn vraag is eigenlijk, hoe kan ik dit opvragen?

Met "window.location.href" e.d. krijg ik enkel de url van de mainframe, en niet die van de pagina met het frameset.

http://www.zelan.be


  • BtM909
  • Registratie: Juni 2000
  • Niet online

BtM909

Watch out Guys...

code:
1
alert(top.window.location.href);


?

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.


  • xentar
  • Registratie: Februari 2003
  • Laatst online: 18-09-2025
code:
1
2
3
alert(top.location.href);
alert(parent.location.href);
alert(self.location.href);


Enkel bij self geeft ook de window.location.href terug.
Bij de andere krijg ik niets terug.

http://www.zelan.be


  • xentar
  • Registratie: Februari 2003
  • Laatst online: 18-09-2025
Aangezien er zo weinig reacties komen, zal ik er maar vanuit gaan dat het niet mogelijk is zeker... :(

http://www.zelan.be


  • BtM909
  • Registratie: Juni 2000
  • Niet online

BtM909

Watch out Guys...

Ik snap het niet hoor :?

Ik krijg met jouw voorbeeld toch echt de window.location terug :?

code:
1
alert(top.window.location);

[ Voor 4% gewijzigd door BtM909 op 08-12-2004 10:36 ]

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.


  • crisp
  • Registratie: Februari 2000
  • Laatst online: 23:35

crisp

Devver

Pixelated

cross-domain security error zeker? ;)

Intentionally left blank

Pagina: 1