sto facendo un form per inviare un messaggio ad un forum in asp e xml, quindi non posso usare all' interno dei campi < > come dice il tutore del tutorial che sto usando(enrico lai) questi caratteri, al pulsante di invio ho associato questo codice che controlla anche le stringhe da inviare e praticamente quando metto quei caratteri e spingo invio mi dice in att che non li posso usare pero poi anche se li cancello mi rimane bloccato
qualcuno mi sa corregere questo script un po lungo è un giorno che ci provo ma non ci riesco grazie mille
on (release) {
if (newname.length != 0 & themsg.length != 0 & title.length != 0 & newname != undefined & themsg != undefined & title != undefined) {
Verifica();
if (trovato == "si") {
att = "I CARATTERI < E > NON SONO AMMESSI";
}else if (trovato == "valpaese") {
att = "SELEZIONARE UN PAESE";
}else {
att = "CONNESSIONE...";
_root.padre = Number(0);
loadVariablesNum ("../public/add_disc.asp", 0, "POST");
_root.controlla = "vai";
}
;
} else {
att = "COMPILARE I CAMPI";
}
;
function Verifica () {
trovato = "no";
_root.country = [];
_root.country = _root.country_cb.getValue();
if (_root.country == 0){
trovato = "valpaese";
};
stringa = newname;
for (i=0; i<stringa.length; i++) {
if (stringa.substring(i, i+1) == ">" | stringa.substring(i, i+1) == "<") {
trovato = "si";
return;
};
}
stringa = title;
for (i=0; i<stringa.length; i++) {
if (stringa.substring(i, i+1) == ">" | stringa.substring(i, i+1) == "<") {
trovato = "si";
return;
};
}
stringa = themsg;
for (i=0; i<stringa.length; i++) {
if (stringa.substring(i, i+1) == ">" | stringa.substring(i, i+1) == "<") {
trovato = "si";
return;
}
;
}
}
}

Rispondi quotando
