ho questo script che alla pressione di un bottone mi aggiorna un div
Codice PHP:
<script type="text/javascript">
var 
myRequest null;

function 
CreateXmlHttpReq(handler) {
     var 
xmlhttp null;
    try {
        
xmlhttp = new XMLHttpRequest();
      }catch(
e){
    try {
        
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(
e){
        
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
  
xmlhttp.onreadystatechange handler;
  return 
xmlhttp;
}

function 
myHandler() {
    if (
myRequest.readyState == && myRequest.status == 200) {
        
document.getElementById("monitor");
        
e.innerHTML myRequest.responseText;
    }
}

// la funzione che permette di ricaricare il contenuto del div BOX
function Ricarica(){
             
// scrivo nel BOX l'elemento di attesa
    
document.getElementById("monitor").innerHTML="<div align='center'>[img]programmi/img/ajax-loader.gif[/img]</div>";

             
// effettuo la richiesta AJAX

    
var Math.random();
    
myRequest CreateXmlHttpReq(myHandler);
    
myRequest.open("GET","url.php?rand="+escape(r));
    
myRequest.send(null);
}
</script> 
questo è quello che io metto nell'index....

mentre nel button <input type='button' value='Ricarica' onclick='Ricarica()' />

il problema e che io vorrei definire l'url di aggiornamento non dallo script principale ma dal button....non so tipo

<input type='button' value='Ricarica' onclick='Ricarica(url.phpeccecc)' />


come si puo' fare?