When I want my aspx page to open as a smaller, pop-up
form, I set the hyperlink target to blank, right?
How do I set the size of the new target? Javascript?, if
so, where. I'd like the user to be able to hit a button
or check a check box to open a small window to enter
their email information for an opt-in list.
Help would really, really be appreciated.
Thanks
Eldon Lei [MSFT] - 22 Jul 2003 22:26 GMT
Hi "Buz"
You can achieve it by using the window.open() method for the client-side
Document Object Model. A reference to the method is here:
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp
Instead of using a hyperlink, you will need to capture the onclick event of
an element (e.g. <a>) and call this method. This method allows you to
create a new window with specific requirements. Like whether the menu bar
will be shown, status bar, width and height, etc. Here's a sample in the
specification page:
window.open("http://www.microsoft.com",null,
"height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");
This will create a new window that contains only the status bar. The height
will be 200 pixels and the width will be 400 pixels.
Hope this helps,
Eldon