Popup Window Location

P

Paul Ross

Is there a way to open a popup window with a specific location relative to
the parent window. For example, centered on the parent window, or near a
specific control on the parent window.

It seems like there should be a way to do this.

Paul
"It was I who allowed the alliance to learn the location of the shield
generator. It is quite safe from your pitiful band."
 
T

Thomas Dodds

Javascript can do it ...

function assist(npage) {
w = 760;
h = 700;
l = (screen.availWidth-10 - w) / 2;
t = (screen.availHeight-20 - h) / 2;

flyout=window.open(npage,'assist','resizable=yes, scrollbars=yes,
width=' + w + ', height=' + h + ',top=' + t + ',left=' + l);
flyout.focus();
}

you can put this in a clientscriptblock from the codebehind if necessary
.....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,156
Messages
2,570,878
Members
47,411
Latest member
Bennie8583

Latest Threads

Top