Codice PHP:
<form  method="post" name="datiCliente" id="datiCliente" action="vaiagestpay.html" onsubmit="if(validateEntryForm(this)){this.submit()}"
questa è la parte iniziale della form e nel bottone invia c'è questo
Codice PHP:
<input name="invia" type="submit" class="submButton2" value="INVIA ORDINE"
la funzione validateform:
Codice PHP:
function validateEntryForm(form)
    {
        return (
          
checkString(form["nome"],'nome')&&
          
checkString(form["cognome"],'cognome')&&
          
checkString(form["indirizzo"],'indirizzo')&&
          
checkString(form["citta"],'città')&&
          
checkString(form["provincia"],'provincia')&&
          
checkCAP(form["CAP"].value) &&
          
checkTel(form["telefono"].value) &&
          
checkString(form["email"], 'email')&&
          
checkEmail(form["email"], true) &&
          
checkEmail(form["stato"], true)
          )
         
// totale(form.elements["TotaleOrdine"].value)
        

poi c'è prima di questa funzione incluso un file js: vi metto solo le parti fondamentali credo
Codice PHP:
function warnEmpty (theFields)
  {   
  
alert(theField);
document.getElementById(theField).focus();
  
alert(mPrefix mSuffix)
  return 
false
  
}

[
I]function warnInvalid (theFields)
  {   
[
COLOR=orange]document.getElementById(theField).focus();[/COLOR
document.getElementById(theField).select()
  
alert(s)
  return 
false
 
}[/I

function 
checkString (theFieldsemptyOK)
{   
// Next line is needed on NN3 to avoid "undefined is not a number" error
    // in equality comparison below.
    
alert(theField);
    if (
checkString.arguments.length == 2emptyOK defaultEmptyOK;
    if ((
emptyOK == true) && (isEmpty(theField.value))) return true;
    if (
isWhitespace(theField.value)) 
       return 
warnEmpty (theFields);
    else return 
true;

MI STO ANNODANDO...
in firefox (dove posso monitorare gli errori meglio ho scoperto:

document.getElementById(theField).focus(); non ha porprietà ed è quello che è chiamato nella funzione warninvalid ma, cosa peggiore (perchè questo a tentativi avrei potuto capirci qualcosa ) negli alert che ho messo il FIELD che mi faccio vedere
mi da [objectNode List]

sto facendo una gran confusione...
una volta ero un mago in js poi ho mischiato ASP, SQL,Actionscript, etc etc e poi sui form ho sempre avuto delle lacune...
perchè non riesco a venirne fuori.. c'è, lo so, un vizio di forma... cioè di FORM
grazie a chiunque avesse la voglia di rispondermi.----

ciao ciao