PDA

View Full Version : How To Open window Onclick..



chef_mercer2003
05-08-2005, 04:59 AM
Hi just wondering is there a way to make this code so it will open a new window onclick instead of location. It is for a menu... thanks

if (ie4||ns6) {document.write('<TR><TD BORDERCOLOR="white" ONCLICK="location=\''+menul[i]+'\'" onmouseover="className=\'menuh\'" onMouseout="className=\'menu\'"><CENTER><FONT>'+menui[i]+'</FONT></TD></TR>')}
else if (ns4){document.write('<TR><TD BGCOLOR="white"><ILAYER><LAYER width="'+menuwidth+'" onmouseover="bgColor=\'yellow\'" onmouseout="bgColor=\'white\'"><CENTER><A HREF="'+menul[i]+'" class=menulinks>'+menui[i]+'</A></CENTER></LAYER></ILAYER></TD></TR>')}

jscheuer1
05-08-2005, 05:32 AM
if (ie4||ns6) {document.write('<TR><TD BORDERCOLOR="white" ONCLICK="window.open(\''+menul[i]+'\')" onmouseover="className=\'menuh\'" onMouseout="className=\'menu\'"><CENTER><FONT>'+menui[i]+'</FONT></TD></TR>')}
else if (ns4){document.write('<TR><TD BGCOLOR="white"><ILAYER><LAYER width="'+menuwidth+'" onmouseover="bgColor=\'yellow\'" onmouseout="bgColor=\'white\'"><CENTER><A HREF="'+menul[i]+'" target="_blank" class=menulinks>'+menui[i]+'</A></CENTER></LAYER></ILAYER></TD></TR>')}