Showing posts with label Popup Window. Show all posts
Showing posts with label Popup Window. Show all posts

Friday, January 23, 2009

Pop Up Window

This is for Pop up window to display one HTML Page.

<a onclick="javascript:window.open('../index.htm','mywindow','top=10,left=10,width=700,height=500, toolbar=no,location=yes,directories=yes,status=yes,menubar=no,scrollbars=yes,copyhistory=no, resizable=no')">Terms And Conditions</a>

Response.Write("<script>window.open('ContactUs.aspx','List','scrollbars=no, resizable=no,width=400,height=280');</script>");

Java Script:

<script type="text/javascript" language="javascript">
function poponload()
{
testwindow= window.open ("Default.aspx", "mywindow",
"location=1,status=1,scrollbars=1,width=100,height=100");
testwindow.moveTo(0,0);

(OR)

window.open ("http://www.javascript-coder.com","mywindow");
}
</script>

<asp:Button ID="Button2" runat="server" Text="Button" OnClientClick="return poponload();" />

When Window close The Popup Window will display:

just add on onunload event in <BODY> Tag <body onunload="javascript: poponload()" >

Link: http://www.javascript-coder.com/window-popup/javascript-window-open.phtml