Home
Categories
HTML Select
CSS Class
General
CheckBox
HTML Textarea
DropDown
jQuery UI
DatePicker
Facebook
HTML Form
HTML DIV
ASP.Net
JSON
Radio
Regular Expressions
HTML Multiselect ListBox
HTML TextBox
RadioButtonList
CheckBoxList
HTML Anchor
Master Pages
HTML5
Bootstrap
Image
FileUpload
HTML Span
ListBox
jQuery
Table
Button
Password TextBox
Sponsored
XML
Forums
Contact
Search
Search
Home
Categories
Forums
Contact
Search
Open new popup window in browser using jQuery
12 Mar 2012
Mudassar Khan
0
Comments
5206 Views
General
Follow @jQueryFaqs
Follow @jQueryFaqs
Here Mudassar Ahmed Khan has explained how to open page in new popup window using jQuery.
Follow @jQueryFaqs
Follow @jQueryFaqs
The below code explains how to open new popup window using jQuery
<
html
xmlns
="http://www.w3.org/1999/xhtml">
<
head
>
<
title
></
title
>
<
script
type
="text/javascript"
src
="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></
script
>
<
script
type
="text/javascript">
$(
"#btnOpenWindow"
).live(
"click"
,
function
() {
window.open(
"http://www.jqueryfaqs.com"
);
});
</
script
>
</
head
>
<
body
>
<
form
id
="form1">
<
input
type
=
"button"
value
=
"Open new window"
id
=
"btnOpenWindow"/>
</
form
>
</
body
>
</
html
>
Explanation:
In the above code snippet there’s an HTML button
btnOpenWindow
to which jQuery click event handler has been assigned. When the button is clicked a new popup window is opened.
For more information regarding additional parameters passed to the JavaScript
window.open
function refer
http://www.aspsnippets.com/Articles/PopUps.aspx
Demo:
Comments
No comments have been added to this article.
Add Comments
Thank you for the feedback. The comment is now awaiting moderation. You will be notified via email when the author replies to your comment.
Please select a comment to reply
You can add your comment about this article using the form below. Make sure you provide a valid email address
else you won't be notified when the author replies to your comment
Please note that all comments are moderated and will be deleted if they are
Not relavant to the article
Spam
Advertising campaigns or links to other sites
Abusive content.
Please do not post code, scripts or snippets.
Follow @jQueryFaqs
Follow @jQueryFaqs
Name
Required
Email
Required
Invalid Email Address
Comment
Required
Security code:
Required
Invalid security code.
Add Comment
Message from Author
Message from Author
Subscribe
Follow @jQueryFaqs
Follow @jQueryFaqs
Error Details
Disclaimer
This site makes use of Cookies. Please refer
Privacy Policy
for more details.