Åben popup - og luk vinduet
HejJeg sidder og roder lidt med et javascript, som jeg vil have til at åbne et popup, og lukke "det gamle" vindue...
Jeg har bare problemer meed at få det nye vindue til at blive ændret i forhold det det gamle. Dvs. at popup'en ligner det gamle vindue...
Min kode:
<script type=text/javascript>
var newWin = null;
function openIt() {
NewWindow=window.open('http://www.eb.dk','newWin','width=800,height=800,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No'); NewWindow.focus(); screen_height = window.screen.availHeight; screen_width = window.screen.availWidth; left_point = parseInt(screen_width/2)-(400/2); top_point = parseInt(screen_height/2)-(300/2); setTimeout('NewWindow.moveTo(left_point,top_point)',100); void(0);
}
function closeThis(){
window.close()
}
function doIt() {
openIt();
setTimeout("closeThis();",1000);
}
</script>
<a href="java script:doIt()">Click Me</a>