Hi , how can i open a page in new window in using javascript.
+1
A:
Try with this piece of code:
window.open("http://www.google.com");
That's if you want to open a new window.
Good luck.
Pablo Santa Cruz
2009-04-22 12:19:46
+1
A:
You can use this:
<script language="javascript" type="text/javascript">
<!--
function popitup(url) {
newwindow=window.open(url,'name','height=200,width=150');
if (window.focus) {newwindow.focus()}
return false;
}
// -->
</script>
You can call it like this:
<a href="something.html" onclick="return popitup('something.html')">Link to popup</a>
karim79
2009-04-22 12:19:52
+1
A:
Refer to http://www.javascript-coder.com/window-popup/javascript-window-open.phtml
You can attach the code as a client-side event on a button.
Anthony
2009-04-22 12:19:58
A:
or you can use plain old html and the target attribute. <a href="link.html" target="_blank">
Chad Grant
2009-04-22 12:51:11