Hey All,
I’m having problems with popups. Here’s two I’ve found:
-
In IE7 popups seem to pop up, then go behind other windows. I haven’t found any info on this anywhere yet, anyone else have any insights?
-
My main window has a Flash 8 movie background in one div - z-index: 1, and the rest of the HTML in another div - z-index: 2. I’m using SWFObject to fill in the second div and get around the “Activate” tooltip problem.
I’m creating my popup using the script below (I’m using asp.net 1.1 and vb.net). If I use a stylesheet to control my <div> tags, then when I pop open the popup, my background goes beneath the rest of the HTML and so it doesn’t display. It looks as though the z-indexing stopped working.
If I put my styles in the <div> tag itself, then it works okay. I don’t mind doing that, but aren’t you “supposed” to use stylesheets these days? (I’m still converting from table style to CSS so I’m new to the CSS mode of thinking.)
I’m using an ImageButton to initiate the popup. In the OnLoad event:
[SIZE=2]ibtnPopup.Attributes.Add(“onClick”, “wopen(‘Popup.aspx’, ‘My Popup’, 300, 275)”)[/SIZE]
[SIZE=2]In the code-behind:[/SIZE]
[SIZE=2]<HEAD>…[/SIZE]
[SIZE=2]<script language=“javascript”>[/SIZE]
[SIZE=2]function wopen(url, name, w, h)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2]w += 32;[/SIZE]
[SIZE=2]h += 96;[/SIZE]
[SIZE=2]wleft = (screen.width - w) / 2;[/SIZE]
[SIZE=2]wtop = (screen.height - h) / 2;[/SIZE]
[SIZE=2]var parms = ‘width=’ + w + ‘, height=’ + h + ', ’ + ‘left=’ + wleft + ‘, top=’ + wtop[/SIZE]
[SIZE=2]var win = window.open(url, ‘’, parms + ‘, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no’);[/SIZE]
[SIZE=2]win.resizeTo(w, h);[/SIZE]
[SIZE=2]win.moveTo(wleft, wtop);[/SIZE]
[SIZE=2]win.focus();[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]</script>[/SIZE]
[SIZE=2] function wopen(url, name, w, h) { w += 32; h += 96; wleft = (screen.width - w) / 2; wtop = (screen.height - h) / 2; var parms = ‘width=’ + w + ‘, height=’ + h + ', ’ + ‘left=’ + wleft + ‘, top=’ + wtop var win = window.open(url, ‘’, parms + ‘, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no’); win.resizeTo(w, h); win.moveTo(wleft, wtop); win.focus(); } </HEAD>[/SIZE]
[SIZE=2]Any other 'better" approaches out there?[/SIZE]
[SIZE=2]THANKS![/SIZE]
[SIZE=2]Larry function wopen(url, name, w, h) { w += 32; h += 96; wleft = (screen.width - w) / 2; wtop = (screen.height - h) / 2; var parms = ‘width=’ + w + ‘, height=’ + h + ', ’ + ‘left=’ + wleft + ‘, top=’ + wtop var win = window.open(url, ‘’, parms + ‘, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no’); win.resizeTo(w, h); win.moveTo(wleft, wtop); win.focus(); } function wopen(url, name, w, h) { w += 32; h += 96; wleft = (screen.width - w) / 2; wtop = (screen.height - h) / 2; var parms = ‘width=’ + w + ‘, height=’ + h + ', ’ + ‘left=’ + wleft + ‘, top=’ + wtop var win = window.open(url, ‘’, parms + ‘, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no’); win.resizeTo(w, h); win.moveTo(wleft, wtop); win.focus(); } function wopen(url, name, w, h) { w += 32; h += 96; wleft = (screen.width - w) / 2; wtop = (screen.height - h) / 2; var parms = ‘width=’ + w + ‘, height=’ + h + ', ’ + ‘left=’ + wleft + ‘, top=’ + wtop var win = window.open(url, ‘’, parms + ‘, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no’); win.resizeTo(w, h); win.moveTo(wleft, wtop); win.focus(); } [/SIZE]