Avatar billede holmqvist Nybegynder
05. april 2005 - 13:51 Der er 7 kommentarer og
1 løsning

change src in frame from remote page

I want to change the src in one frame "main" from a popup window, with a script without having the user to click a link. It's for a login thing..
Avatar billede fennec Nybegynder
05. april 2005 - 13:55 #1
Something like this??
<body onLoad="opener.location.href='enSide.htm'">
Avatar billede holmqvist Nybegynder
05. april 2005 - 14:08 #2
where do you define the frame that it's going to open in?
I tried the above but that opens the page into the popup..
Avatar billede fennec Nybegynder
05. april 2005 - 14:21 #3
The code is to be placed in the popup window.
opener gets the frame/window that opened the popup.
If that is not the frame/window that is to change, you have to step though the frameset just like folders in DOS.
top is the top level (equal to cd \)
parent is up one level (equal to cd ..)

If you have 2 frames on the main page, and the popup is opened from FrameName1 and you want to change frameName2:
<body onLoad="opener.parent.FrameName.location.href='enSide.htm'">
Avatar billede holmqvist Nybegynder
05. april 2005 - 14:30 #4
Because I change page on the popup it seems to refer to itself as opener :(
Avatar billede fennec Nybegynder
05. april 2005 - 14:42 #5
It shouldn't do that.
If you change the page that loaded the popup you loose the connection, but you should be able to change the popup page. I do it many places, when I put data in my database.

Du you have a link, so we kan se it in action??
Avatar billede holmqvist Nybegynder
05. april 2005 - 17:41 #6
It's working now, your script worked, there was just some other problems in PHP..
Thank you!
Svar-->
Avatar billede roenving Novice
06. april 2005 - 00:13 #7
Pråter du också engelska med din tjej ?-)
Avatar billede fennec Nybegynder
06. april 2005 - 08:30 #8
.o) <-- One Eyed Jack
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester