Click here to Skip to main content
15,749,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In I have hyperlink button in when I am click the button open a pop-up window with some heading some 4 lines of content and OK and cancel button. When I am click the OK button it's redirect to some other site. That site should be open in new tab. Could you please help on this.

What I have tried:

I am tried using on click event
function basicPopup()
popupWindow ="my content", 'popUpWindow', 'height=300,width=600,left=100,top=30,resizable=No,scrollbars=No,toolbar=no,menubar=no,location=no,directories=no, status=No');
Updated 20-Nov-16 7:48am

1 solution

For decision making popup instead of open a new window, you should open a DIV (if you are not using any client based UI framework like Kendo UI).

DIV should show the four lines of text and two buttons OK and Cancel. On clicking OK, you should open the new window using Window.Open javascript api. But its the behaviour of the browser if the new page would be open as new tab new window. You could refer following article for more insight on it;
Open a URL in a new tab (and not a new window) using JavaScript - Stack Overflow
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900