is there any framework (jquery, or anything else) or any java script which can handle this problem:
I can't believe, there is no (complex) solution for it!
(and: would be nice if it's working on IE7+, FF, Safari, Chrome)
You simply need to bind a handler for the onclick
event that will call window.open()
to open the new window. I haven't tested in all browsers, but the ones I have tested in don't fire the onclick
event when you use the middle (scrollwheel) or right mouse buttons.
HTML:
<a href="yourpage.html" class="popuplink">Click me!</a>
jQuery:
$('a.popuplink').on('click', function(e) {
e.preventDefault(); // don't want to follow the link
window.open(this.href, 'new_window', 'width=800,height=600').focus();
});