Open a New Window Using JavaScript and Control it’s Appearance
This simple code will allow you to open a new window using JavaScript – and control the way it looks.
<html>
<head>
<script type="text/javascript">
function openWindow(link)
{
window.open(link,"_blank","toolbar=yes, location=no, directories=no, status=yes,
menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=400, height=400");
}
</script>
</head>
<body>
<a href="#" onclick="openWindow('http://www.webdesigntuts.net/');">Open Window</a>
</body>
</html>
| Print article | This entry was posted by kpac on August 6, 2009 at 8:10 pm, and is filed under JavaScript Tutorials. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
