Salve a tutti,
dovre modificare questa semplice funzione per fare in modo che l'azione venga eseguita solo se req.xhRequest.responseText è maggiore di 0.


Codice PHP:
<script type="text/javascript">
<!--
//
// Callback function that will update the response_form1 div with the response that comes from the server
//
    
function updateResponseDiv(req
    {
        
        
Spry.Utils.setInnerHTML('response_form1'req.xhRequest.responseText ' elementi corrispondenti');

    } 
ho provato a modificarla in questo modo ma non funziona
Codice PHP:
<script type="text/javascript">
<!--
//
// Callback function that will update the response_form1 div with the response that comes from the server
//
    
    
    
function updateResponseDiv(req
    {
        var 
str2num Number(req.xhRequest.responseText);
if (
str2num 0
        
Spry.Utils.setInnerHTML('response_form1'req.xhRequest.responseText ' elementi corrispondenti');

    } 
Come posso fare?
ciao e grazie.