Groups | Blog | Home
all groups > asp.net > january 2004 >

asp.net : Popup open but always under


Gilles T.
1/16/2004 10:56:56 PM
Hi,

I have this code:
<script language="VB" runat="server">
Sub cmdImprimer_Click(sender As Object, e As System.EventArgs)
Page.RegisterStartupScript("openWindow","<script
language='JavaScript'>window.open('dialog.aspx,'Rapport','toolbar=no,locatio
n=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,widt
h=900px,height=700px').focus();<" & "/" & "script>")
end sub
</script>

<center>
<asp:Button CssClass="InputButton" ID="cmdPrint" runat="server"
Text="Imprimer" OnClick="cmdImprimer_Click" />
</center>


My popup window open and execute good but always UNDER my current window.
How I can write my code to have my popup window over my current window?

Thanks

Kenneth
1/17/2004 3:51:10 PM
It's a timing problem.

Add a JS setTimeout for about 200 ms. to the window.open,
something like ... 'Javascript'>setTimeout(window.open(....

Gilles T.
1/19/2004 12:04:15 AM
Hi Kenneth,

Working very good. I appreciate your help. Thanks!

GillesT

[quoted text, click to view]

AddThis Social Bookmark Button