Salve ragazzi ; quello sotto e` parte del codice js di un file esterno che nella pagina html appare come un menu` a tendina.
Volevo chiedere se sia possibile far aprire direttamente dalle voci dell`array var links ("casali.htm", ecc..), per ognuna delle voci, una popup. Si puo`? E se si in che modo? Se non si puo`, come posso aggirare il problema? Grazie.
var ron="#c6de9e";
var roff="#ffffff";
var leftmargin=75;
var topmargin=272;
var largo=125;
var Home = false;
var HomeLink = "";
var HomeText = "";
var HomeWidth = 50;
var voci=new Array();
voci[0]=new Array("offerte","casali","immobili di prestigio","monofamiliari","plurifamiliari","altro ");
var links=new Array();
links[0]=new Array("#","casali.htm","immobili.htm","monof.htm", "plurif.htm","altro.htm");
var targets=new Array();
targets[0]=new Array("self","self","self","self","self","self");
var wst=new Array();
wst[0]=new Array("","","","","","");
var nn=document.layers?true:false,N6=navigator.userAge nt.toLowerCase().indexOf("gecko")!=-1?true:false,conta=0,last=0;
var op=navigator.userAgent.toLowerCase().indexOf("oper a")!=-1?true:false
HomeWidth=Home?HomeWidth:0;
var MenuLength=HomeWidth+largo*voci.length;
var BrowserWidth=nn||op?window.innerWidth:N6?document. width:document.body.clientWidth;
//leftmargin=parseInt((BrowserWidth-MenuLength)/2);
if (nn)
{
}
else{
if (Home)
document.write("<DIV ID=mtop. STYLE=\"width:"+HomeWidth+";height:15;background:" +roff+";visibility:visible;cursor:hand\" onMouseOver=showdeps(last,false);mroll('mtop.') onMouseOut=unmroll('mtop.')>"+HomeText+"</DIV>");
for (i=0;i<voci.length;i++)
{
var n=i;
document.writeln("<DIV ID=mtop"+n+". STYLE=\"width:"+largo+";height:15;background:"+rof f+";visibility:visible;cursor:hand\" onMouseOver=MostraMenu("+n+");mroll('mtop"+n+".'); conta++ onMouseOut=last="+n+";unmroll('mtop"+n+".');conta--><DIV ALIGN=center CLASS=menuIEb onClick=vai('"+links[i][0]+"',"+i+",0)>"+voci[i][0]+"</DIV></DIV>");
for (l=1;l<voci[i].length;l++)
document.writeln("<DIV ID=mdep"+i+"."+l+" STYLE=\"width:"+largo+";height:15;background:"+rof f+";visibility:hidden;cursor:hand\" onMouseOver=;mroll('mdep"+n+"."+l+"');conta++ onMouseOut=unmroll('mdep"+n+"."+l+"');conta-- CLASS=menuIE onClick=vai('"+links[i][l]+"',"+i+","+l+")>"+voci[i][l]+"</DIV>");
}
}
timer=setInterval("NascondiMenu()",300)
function NascondiMenu()
{
if (conta==0)
{
coloratutti(false)
timer=setTimeout("coloratutti(false)",200);
timer=setTimeout("showdeps(last,false)",250);
}
}