Forum Moderators: phranque

Message Too Old, No Replies

Question about making a new window open up

on click

         

Matrixster

4:28 pm on Sep 17, 2005 (gmt 0)

10+ Year Member



One of the links on my site opens up a new window.

Is there a way I can make that open up without all the toolbar type stuff on the top of the window?

Is there a way I can set the size of the new window? Like make it small?

rocknbil

5:57 pm on Sep 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



See Javascript Forum for more info.

<a href="mypage.html" onClick="newWindow('mypage.html'); return false;">My Page</a>

<script type="text/javascript">
function newWindow(url) {

var day = new Date();
var id = day.getTime():
// The previous insures a new window always opens
// instead of clicked content opening in the same window

var win=open(url,id,'width=300,height=400,scrollbars,resizable');
}
</script>

I recommend ALWAYS leaving scrollbars and resizable ON, you never know what someone's going to experience.