Javascript code to open pop-up window on button click?
<p>I want to know how to write a javascript code that will open a new 600*300 pop-up window on button click.</p>

<p>Let's say i have a open-up button in my Books.aspx ...and when i click "display", i want a few books to be display in the pop-up window, which is another web-form called BooksAuthor.aspx</p>

<p><strong>This is what i've tried so far:</strong></p>

<p><strong>Option 1</strong></p>

<pre><code>&lt;asp:TextBox ID="text1" runat="server"&gt;&lt;/asp:TextBox&gt;
&lt;asp:Button ID="button1" runat="server" onClick="window.open('BooksAuthor.aspx');" Text="Display" /&gt;&lt;br /&gt;&lt;br /&gt;
</code></pre>

<p><strong>Option 2</strong></p>

<pre><code>&lt;asp:TextBox ID="text1" runat="server"&gt;&lt;/asp:TextBox&gt;
&lt;asp:Button ID="button1" runat="server" onClick="openWindow();"Text="Display" /&gt;&lt;br /&gt;&lt;br /&gt;

&lt;script type="text/javascript"&gt;
function openWindow()
{
    window.open("BooksAuthor.aspx", "status=1,width=600,height=300");
}
</code></pre>

<p>Nothing seems to be working. Any ideas?</p>

<p>Thank you!</p>