View Full Version : Opening Multiple Link in multiple Window

03-26-2010, 02:30 PM
I m trying to prepare an application, which accepts Visitors interests in Check-boxes and open different links in new windows. But, the problem is I canít able to open those links in different new windows at a time, its opening only first link within the same window, but I want to open all links in different windows. Following is my code :-

$u=implode(', ',$_POST['unit']);
$un = explode(", ", $u);

for ( $counter = 0; $counter <= 4; $counter += 1) {
if ($un[$counter] != "") {
echo $un[$counter]."<br>";
echo $e."<br>";
<script language="javascript">
window.location.href="http://www.mercatornet.com?unit=<?php echo $un[$counter];?>&from=<?php echo $e;?>";

03-29-2010, 12:43 AM
Im not so good with Js but im gonna make a try, i already have the same problem and i make this poor function:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>

<body><a href="javascript:multipopup(['bla.htm','bla2.htm','bla3.htm'])">Click me plz</a>
<script language="javascript">
function multipopup(where) {
var total = where.length;
alert(total); // How much Windows Sir?
var mypopups = window.open('"'+where[x]+'"', "page"+x, "width=400, height=400, status=no, scrollbars=no, toolbars=no, menubar=no");

I hope it helps in the meantime.