dynamic jQuery with PHP

dynamic jQuery with PHP

Hi, I am using the following code:
<script src="js/jquery.tools.min.js"></script>
   
   
<SCRIPT type="text/javascript">
function geturl(addr) { 
var r = $.ajax({ 
type: 'GET', 
url: addr, 
async: false 
}).responseText; 
return r; 

 
function changediv(url) { 
$('#PrintContent').html(geturl(url)); 
}
</script>

Note the url in the change div functions.
My PHP outputs the following:


<td><a href="#" onClick=changediv("printresultpage.php?id=5");">
<img src='http://www.dieseladagency.com/dieselCMS/uploads/smad2.jpg'></a></td>

<td><a href="#" onClick=changediv("printresultpage.php?id=4");">
<img src='http://www.dieseladagency.com/dieselCMS/uploads/smad1.jpg'></a></td>

etc...

printresultpage.php?id=5 looks something like this::
<img src='http://www.dieseladagency.com/dieselCMS/uploads/ad2.jpg'>

But my #PrintContent div doesn't update. It looks like this: <div id="PrintContent">Print content gos here</div>

Can anyone tell me how the code the url in the changediv function so that it can be dynamic?


thanks