View Full Version : poupup wndow using javascript

Apr 6th, 2007, 11:07 AM
I want to make a poupup window ,appearing on button click. Any suggestions do i have to use java script or there is written component i can use . Thank you.

Mr J
Apr 6th, 2007, 01:54 PM
Try this

<button onclick="window.open('page.htm')">Open Window</button>

Apr 6th, 2007, 09:46 PM
I think in Firefox, <button>'s default behavior is the same as submit button. So you have to return false to cancel form submission.

<button onclick="window.open('page.htm');return false;">Open Window</button>
Or you can use the <input> tag for more cross-browser compatibility.

<input type="button" onclick="window.open('page.htm');" value="Open Window" />