ho un enorme problema con un file javascript, quando lo richiamo nella pagina non va mentre se metto il codice direttamente nella pagina funziona.
i due file si trovano nella stessa cartella.
giuoco.html
<!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" lang="it">
<head>
<script type="text/javascript" src="Avanti.js"></script>
</head>
<body>
[img]../../buttons/1b.png[/img]
</body>
</html>
Avanti.js
function Z()
{ var pa = location.href;
var pe = parseInt(pa.substring(49,51));
Livello=pe;
Lim_gio=4;
URL_in="../..";
URL_fn="giuoco.html";
Livello=Livello+1;
Gioco=Math.round(Math.random()*Lim_gio)+1;
Dest= URL_in+"/"+Livello+"/"+Gioco+"/"+URL_fn;
//location.href=Dest;
alert(Dest);
}
grazie in anticipo a chi mi aiuta!!!!!