Buttons Effects >>> Position.
 
Script Categories













Buttons Effects >>> Position.

Do you not like where window.open() opens your new windows? Using this JavaScript, you can actually have the new window open wherever you want!

Open Window

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">
/* Visit http://www.yaldex.com/ for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
function win() {
msg=window.open("","msg","height=200,width=200,left=80,top=80");
msg.document.write("<html><title>Windows!</title>");
msg.document.write("<body bgcolor='white' onblur=window.close()>");
msg.document.write("<center>page content here</center>");
msg.document.write("</body></html>");

// If you just want to open an existing HTML page in the
// new window, you can replace win()'s coding above with:
// window.open("page.html","","height=200,width=200,left=80,top=80");

}
// End -->
</script>
<center>
<form>
<input
type="button" value="Open Window" onclick="win()">
</form>
<a href="javascript:win()">Open Window</a>
</center>

Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.



Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).




©