/ Published in: JavaScript
Call this function with a URL and it will open it in a new browser window. Its synonymous to auto clicking a link with the target="_blank" attribute set.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function myOpenWindowCode() { var oWin = window.open("http://www.google.com", '_blank'); if (oWin) { if (oWin.focus) oWin.focus(); return false; } oWin = null; return true; }