views:

125

answers:

1

Hello, i used a onclick event for this js function:

window.opener.location.href =foobar;

After loading foobar in the Parent window this window should close. It is a popup (opended with JS)

A: 
window.close()

should work.

Pekka
I does BUT then the parent window don't load the url....
SurfingCat
It will if you put window.close() AFTER the location change.
Pekka
like so: `window.opener.location.href =foobar;window.close();`
Pekka
i did, but same problem
SurfingCat
Ok i tried again and it works. I tried this yesterday and i did not. But ok... i dont know why. Thanks volks
SurfingCat