iframek es popupok (toredekek a fejleszto naplojabol)
Van egy iframed, abbol nyit a felhasznalo egy popupot, kulso webszolgaltatassal valo autenikalas celjabol, adsz neki egy callback URL-t, ami viszont ugye a popupba iranyit vissza, te viszont szeretned, ha az iframe tartalma lecserelodjon, majd bezarodjon a popup. Hogy csinalod? Ugy, hogy egy ilyesfajta HTML-t (es benne levo js-t) adsz meg callbacknek:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript"> | |
var close_and_redirect = function() { | |
if (opener && !opener.closed) { | |
opener.location.href = "http://localhost:9610/done"; | |
} | |
window.close(); | |
} | |
</script> | |
</head> | |
<body onload="setTimeout('close_and_redirect()', 500)"> | |
Yay, logged in! Closing... | |
</body> | |
</html> |