can't redirect new page in javascript?
<p>can someone help me redirect to new page in javascript?</p>

<p>here is my code</p>

<pre><code>&lt;p style=float:right;&gt;&lt;font color="green"&gt;&lt;a href=""  onclick='return validate1();'&gt;Delete&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;


function validate1()
{



var j1=0;
     for(var i=0; i &lt;document.Check.clickeduser.length;i++)
        {
            if(document.Check.clickeduser[i].checked)
                {
                    if(j1==0)
                    {   
                        total1 +=document.Check.clickeduser[i].value;

                    }
                    else
                    {
                        total1 +="|"+document.Check.clickeduser[i].value;
                    }
                j1++;
                }

        }

if(total1=="")
{


alert("Select user to Delete"); 
return false;

}
else
{


var where_to= confirm("Do you really want to delete??");

 if(where_to==true)
 {

 window.location = '&lt;?php echo $redirect ?&gt;locations.php?locationid='+total1;


 }

 else
 {
 total1="";


     document.Check.checkall.checked = false;

//alert("alert");
 for(var j=0; j&lt;=document.Check.clickeduser.length;j++)
    {
     document.Check.clickeduser[j].checked = false;
    }


 }

return true;
}


}
</code></pre>

<p>here window.location = 'locations.php?locationid='+total1; could n't redirect this link.</p>

<p>i don't know what's wrong please guide me</p>

<p>Thanks for advance</p>
