Len Smith
Len Smith

Reputation: 197

Adding z-index to a window

How can I add a zindex value to the following string so that the pop-window is always on top?

string winopen = "Window.Open('Details - " + name + "', 'test.aspx', 'dest=" + destination.Value + "&id=" + id.Value + "', [250,250], [100,100], true); return false;";
button1["onclick"] = winopen ;

Upvotes: 0

Views: 1488

Answers (3)

Mark Hall
Mark Hall

Reputation: 54552

You can also try using the Dependent Parameter, It will open the Popup as a Child Window.

Upvotes: 1

Mario Binder
Mario Binder

Reputation: 1623

have you try to give your window an focus?

var mywindow;
function OpenWindowOnTop(url)
{
   mywindow=window.open(url,'name', ... snip ...[250,250], [100,100], true);
   if (window.focus) {
       mywindow.focus()
   }
}

Upvotes: 1

jeffjenx
jeffjenx

Reputation: 17487

Add winopen.focus(); to bring focus to the newly created window.

Upvotes: 0

Related Questions