ciao
ho fatto una ricerca ed ho trovato alcuni suggerimenti per caricare un file esterno, ma non posso procedere finche non riesco a caricarlo normalmente. Lo esecuzione dello script si blocca e non capisco perchè.
Il file esterno di prova non contiene altro che: var xxxx = 5; cioè nulla che possa bloccare l'esecuzione e la pagina (senza caricare il file esterno) funziona regolarmente.
vuoi provare tu a capirci qualcosa?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head>
<title> TORNEI </title>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta http-equiv="imagetoolbar" content="no">
<meta name="GENERATOR" content="Matrix Y2K">
<style type="text/css"> <!--
body {background:#ABCDEF; overflow-x:hidden; scrollbar-base-color:#ABCDEF;}
.but {font-style:normal; font-size:24pt; font-family: Times New Roman, Arial, Verdana;
width:380px; height:45px; position:absolute; text-align:center;}
.cas {height:30px; position:absolute; top:0px;
font-style:normal; font-size:30pt; text-align:center; color:#000000;
font-family:Times New Roman, Arial, Verdana; z-index:1;}
.cnt {width:442px; height:50px; position:absolute; left:170px; z-index:1;
background-color:#FFFFCC; border:1px solid;}
--> </style>
</head>
<body>
<div id="Pulsante" style="width:200px; height:45px; position:absolute; left:200px; top:5px; visibility:hidden;" OnMouseUp="Avanti()">
<input id="Imput" class="but" type="button" value="PRIMO &nbsp; &nbsp; TURNO"></div>
<script type="text/javascript"> <!---
var numerogiocatori = window.prompt(" QUANTI GIOCATORI ?"," scrivilo qui .....");
// -->
</script>
<script type="text/javascript"> <!---
// src="ng12.js"
// numerogiocatori = 12
var numerotavoli = numerogiocatori / 4
var nome = "";
var hh = 0;
while (hh < numerotavoli)
{
document.write("<div class='cnt' style='top:" + 55 * (hh + 1) + "px;'>");
nome = "A" + (4 * hh + 1);
document.write("<span id='" + nome + "' class='cas' style='width:60px; left:0px;'></span>");
document.write("<span class='cas' style='width:40px; left:60px;'>e</span>");
nome = "A" + (4 * hh + 2);
document.write("<span id='" + nome + "' class='cas' style='width:60px; left:100px;'></span>");
document.write("<span class='cas' style='width:120px; left:160px;'>contro</span>");
nome = "A" + (4 * hh + 3);
document.write("<span id='" + nome + "' class='cas' style='width:60px; left:280px;'></span>");
document.write("<span class='cas' style='width:40px; left:340px;'>e</span>");
nome = "A" + (4 * hh + 4);
document.write("<span id='" + nome + "' class='cas' style='width:60px; left:380px;'></span>");
document.write("</div>");
hh++;
}
document.getElementById("Pulsante").style.visibili ty = "visible";
// ---------------------------------------------------------------------------
var contaturni = 0

window.onload=function()
{
Avanti()
};

function Avanti()
{
contaturni = contaturni + 1;
switch(contaturni)
{
case 1: document.getElementById("Imput").value = "PRIMO TURNO";
Estrazione();
break;
case 2: document.getElementById("Imput").value = "SECONDO TURNO";
Estrazione();
break;
case 3:
document.getElementById("Imput").value = "TERZO TURNO";
Estrazione();
break;
case 4:
document.getElementById("Imput").value = "QUARTO TURNO";
Estrazione();
break;
default: return;
}
}

function Estrazione()
{
var h = 0;
var est = numerogiocatori * (contaturni - 1);
for (h = 1; h < numerogiocatori + 1; h++) document.getElementById("A" + h).innerHTML = num[est + h];
}
// ---------------------------------------------------------------------------
num = new Array();
num[1] = 1;
num[2] = 12;
num[3] = 8;
num[4] = 6;
num[5] = 4;
num[6] = 11;
num[7] = 3;
num[8] = 9;
num[9] = 5;
num[10] = 10;
num[11] = 7;
num[12] = 2;
num[13] = 8;
num[14] = 9;
num[15] = 2;
num[16] = 10;
num[17] = 11;
num[18] = 1;
num[19] = 12;
num[20] = 5;
num[21] = 7;
num[22] = 6;
num[23] = 3;
num[24] = 4;
num[25] = 8;
num[26] = 3;
num[27] = 5;
num[28] = 9;
num[29] = 11;
num[30] = 12;
num[31] = 4;
num[32] = 2;
num[33] = 1;
num[34] = 6;
num[35] = 10;
num[36] = 7;
num[37] = 9;
num[38] = 12;
num[39] = 5;
num[40] = 7;
num[41] = 4;
num[42] = 6;
num[43] = 2;
num[44] = 8;
num[45] = 3;
num[46] = 11;
num[47] = 1;
num[48] = 10;
// -->
</script>
</body> </html>


rudyF