Click to See Complete Forum and Search --> : Multiple window openings
charish2k1
09-13-2003, 07:26 PM
<SCRIPT language="JavaScript">
<!--hide
function newwindow()
{
window.open('url','name','width=#,height=#,attribute1,attribute2');
}
//-->
</SCRIPT>
That's the script I'm using to open one window on a page. However, I wanna open multiple windows that can't be resized (I already know the reziable attribute). Any ideas on how? :confused:
Charles
09-13-2003, 07:45 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<title>Example</title>
<ul>
<li><a href="http://www.w3.org/TR/html4/" onclick="window.open(this.href, '', 'height=400,width=300'); return false">HTML 4.01</a></li>
<li><a href="http://www.w3.org/TR/xhtml1/" onclick="window.open(this.href, '', 'height=400,width=300'); return false">XHTML<sup>&trade;</sup> 1.0</a></li>
<li><a href="http://www.w3.org/TR/xhtml11/" onclick="window.open(this.href, '', 'height=400,width=300'); return false">XHTML<sup>&trade;</sup> 1.1</a></li>
</ul>
xataku_nakusute
09-13-2003, 07:45 PM
simply duplicate the window.open() function as many times as you need eg:
<SCRIPT language="JavaScript">
<!--hide
function newwindow()
{
window. open('url','name','width=#,height=#,attribute1,att
ribute2');
window. open('url2','name2','width=#,height=#,attribute1,att
ribute2');
}
//-->
</SCRIPT>
i believe that should work as long as the windows' names are different
charish2k1
09-14-2003, 09:13 AM
Errrr . . . ok, got that. What about in the link tag for the onClick function? Could you gimme an example using some links, attributes, etc.?? *sorry, is a semi-JS illiterate :S*
Charles
09-14-2003, 12:17 PM
Originally posted by charish2k1
What about in the link tag for the onClick function? Could you gimme an example using some links, attributes, etc.??<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<title>Example</title>
<ul>
<li><a href="http://www.w3.org/TR/html4/" onclick="window.open(this.href, '', 'height=400,width=300'); return false">HTML 4.01</a></li>
<li><a href="http://www.w3.org/TR/xhtml1/" onclick="window.open(this.href, '', 'height=400,width=300'); return false">XHTML<sup>&trade;</sup> 1.0</a></li>
<li><a href="http://www.w3.org/TR/xhtml11/" onclick="window.open(this.href, '', 'height=400,width=300'); return false">XHTML<sup>&trade;</sup> 1.1</a></li>
</ul>