Friday, March 16, 2012

Open another smaller window

Hi

I would like to open another smaller window on top of the existing window,
how can I do that?

Thank you,
SamuelAll "opening of windows" when a page is loaded in the browser must be done
with client script. You can do this many ways, one of the simplest, just to
experiment with , is:

string scr= @."window.open('', tinyWindow', 'toolbar,width=150,height=100') ;
myWindow.document.write('Welcome to this new window!');
myWindow.document.bgColor='lightblue';";

Response.Write("<script>" +scr + "</script>");

Hope that helps.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Samuel Shulman" wrote:

Quote:

Originally Posted by

Hi
>
I would like to open another smaller window on top of the existing window,
how can I do that?
>
Thank you,
Samuel
>
>
>


NOTE: There are some syntax errors in the code I posted, but you get the
general idea. You can also use the ClientScript methods of the Page class.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Samuel Shulman" wrote:

Quote:

Originally Posted by

Hi
>
I would like to open another smaller window on top of the existing window,
how can I do that?
>
Thank you,
Samuel
>
>
>


You can open windows with the javascript window.open method. This includes
options for sizing the window and making various toolbars and menus
visible/invisible.
Here's more info:
http://SteveOrr.net/articles/ClientSideSuite.aspx
http://msdn.microsoft.com/workshop/...hods/open_0.asp
Some popup blockers may foil your plans however, so consider alternate
designs.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
"Samuel Shulman" <samuel.shulman@.ntlworld.comwrote in message
news:Or7pcAPDHHA.4620@.TK2MSFTNGP04.phx.gbl...

Quote:

Originally Posted by

Hi
>
I would like to open another smaller window on top of the existing window,
how can I do that?
>
Thank you,
Samuel
>

0 comments:

Post a Comment