Innanzitutto grazie ma guardando il tuo codice ho capito ciò che non funzionava:
dati.load("http://www.xxx.com/public/news.txt?a="+random(999999));
ecco il segreto ... era in asp, che questioni di aggiornamento, che non ricevevo la nuova news ... ora funzica a dovere:
PER I POSTERI:
codice:
//in _root
carico();
function carico () {
dati=new LoadVars ();
dati.onLoad = function (ok) {
if (ok) {
news=dati.news;
}
}
dati.load("http://www.xxx.com/public/news.txt?a="+random(999999));
}
function invio () {
datinv=new LoadVars ();
_root.news="";
_root.dati.news="";
newsperasp="news="+newnews;
datinv.newsperasp=newsperasp;
datinv.sendAndLoad("http://www.xxx.com/public/inser.asp",datinv, "POST");
datinv.onLoad = function (ok) {
if (ok) {
carico();
}
}
}
//in bottone INVIO
on(release){
invio();
}
L'asp:
codice:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim FSO, Txtfile
'news = request("newsperasp")
Set FSO = CreateObject("Scripting.FileSystemObject")
'Set Txtfile = FSO.CreateTextFile("http://www.xxx.com/public/news.txt")
Set Txtfile = FSO.CreateTextFile(Server.MapPath("news.txt"))
Txtfile.WriteLine request("newsperasp")
'newsperasp=""
Response.Write("&scritto=ok&")
Txtfile.Close
Set Txtfile = Nothing
Set FSO = Nothing
%>
Buon divertimento ... e ancora grazie AND80