RE: Re : php ajax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Everything looks OK. Do you get an error? Is this on the web where I can run
it myself?

Rob. 

-----Original Message-----
From: php-objects@xxxxxxxxxxxxxxx [mailto:php-objects@xxxxxxxxxxxxxxx] On
Behalf Of eric amougou
Sent: 20 March 2007 09:25
To: php-objects@xxxxxxxxxxxxxxx
Subject: Re :  php ajax

Robert, I tried getting it working...  No way with prototype. Maybe I have
some wrong settings. anyway here is what I did after copying the prototype.js
file to the working folder:


php file for ajax: ajaxtest.php

<?php
if (@$_POST['task' ] == "details") {
echo "This is some text returned from the PHP engine via AJAX"; exit; } ?>

php file for html output: testajax1.php

<html>
<head>
<title>Ajax Test</title>
<script type="text/javascript" src="prototype.js"></script>

<script>
function update_content( ) {
new Ajax.Updater( 'dynamic' , 'ajaxtest.php' , { method: 'post',
parameters: { task: 'details' } });
}
</script>
</head>
<body>
<table border="1" width="100%" >
<tr>
<td width="33%" onclick="update_ content(); "><a href="#">Update
content</a></td> <td width="33%"> &nbsp;</td> <td width="34%"> &nbsp;</td>
</tr> <tr> <td width="33%"> &nbsp;</td> <td width="33%"> <div id="dynamic" >I
am going to put some content here</div></ td> <td width="34%"> &nbsp;</td>
</tr> <tr> <td width="33%"> &nbsp;</td> <td width="33%"> &nbsp;</td> <td
width="34%"> &nbsp;</td> </tr> </table> </body> </html>

***********************************************************************************
Any opinions expressed in email are those of the individual and not necessarily those of the company. This email and any files transmitted with it are confidential and solely for the use of the intended recipient 
or entity to who they are addressed. It may contain material protected by attorney-client privilege. If you are not the intended recipient, or a person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited.

Random House Group + 44 (0) 20 7840 8400
http://www.randomhouse.co.uk
http://www.booksattransworld.co.uk 
http://www.kidsatrandomhouse.co.uk
Generic email address - enquiries@xxxxxxxxxxxxxxxxx

Name & Registered Office:
THE RANDOM HOUSE GROUP LIMITED
20 VAUXHALL BRIDGE ROAD
LONDON
SW1V 2SA
Random House Group Ltd is registered in the United Kingdom with company No. 00954009, VAT number 102838980
***********************************************************************************


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux