Hi all,

I will appreciate any help coming my way. I did start with grand plans but am now beaten to pulp by AJAX not showing any signs of execution.

I want to update a simple div with updated text input through a form on the same page. Without , naturally, reloading the whole page.

My web page looks like this

Code:
<html>

<head>
<meta http-equiv="Content-Language" content="en-au">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Length</title>
<script src="javascripts/prototype.js" type="text/javascript"></script>
<script src="javascripts/scriptaculous.js" type="text/javascript"></script>
<script type="text/javascript">
 /* ajax.Request */  
 function ajaxRequest(url,data) { 
 	$('chart').innerHTML = data; 
   var aj = new Ajax.Request(  
   url, {  
    method:'get',   
    parameters: data,   
    onComplete: getResponse  
    }  
   );  
 }  
 /* ajax.Response */  
 function getResponse(oReq) {  
   $('chart').innerHTML = oReq.responseText;  
 }  
</script>
</head>
<body>
	Length <input type="text" name="length" size="4"> </p>
	<p>Width&nbsp; <input type="text" name="width" size="4"></p>
	<p><input type="button" value="Redraw" name="submit" onclick="ajaxRequest('imgHolder.php','len='+$F('length'))"></p>

<div id="chart"></div>
</body>

</html>
The imgHolder.php code is :

Code:
<?php

   if(isset($_GET['len'])) {  
      echo "You entered: ".$_GET['len'];  
    }  

?>
It doesn't work. I don't know what I am doing wrong here because most of this is from different tutorials. This is the first time I am attempting any web programming so maybe I am missing something obvious here.

Any help will be really appreciate.

Thanks

SD