javascript - Open pop window on enter key -


i need open pop window (www.google.com) has link of other site, on pressing enter key in text field. alert message not pop window.

here have got now

$('input').bind("enterkey",function(e){ alert("enter"); }); $('input').keyup(function(e){ if(e.keycode == 13) {   $(this).trigger("enterkey"); } }); 

fiddle

please let me know how new pop window opened.

did try this?

$('input').bind("enterkey",function(e){     window.open("http://www.google.com",'name','width=800,height=400'); }); $('input').keyup(function(e){ if(e.keycode == 13) {   $(this).trigger("enterkey"); } }); 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -