473,387 Members | 1,470 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

PHP and AJAX

Can anyone point me to some good online literature about communicating
between PHP and AJAX. Are there any libraries that would allow PHP to
send back request information to the calling HTML page?

Thanks

Fred Weinhaus
Jul 22 '06 #1
9 1712
Rik
Fred Weinhaus wrote:
Can anyone point me to some good online literature about communicating
between PHP and AJAX. Are there any libraries that would allow PHP to
send back request information to the calling HTML page?

There's absolutely no difference between calls from AJAX and normal browser
calls as far as PHP is concerned. It's just another request. No difference
to PHP. Let PHP output the needed text/HTML/XHTML/XML, and process it with
javascript.

Anything that has to be done with the supplied information is js, so if you
run into problems, check the code PHP produces, if that's OK, ask on
c.l.javascript.

Grtz,
--
Rik Wasmus
Jul 22 '06 #2
In article <3e***************************@news2.tudelft.nl> ,
"Rik" <lu************@hotmail.comwrote:
Fred Weinhaus wrote:
Can anyone point me to some good online literature about communicating
between PHP and AJAX. Are there any libraries that would allow PHP to
send back request information to the calling HTML page?


There's absolutely no difference between calls from AJAX and normal browser
calls as far as PHP is concerned. It's just another request. No difference
to PHP. Let PHP output the needed text/HTML/XHTML/XML, and process it with
javascript.

Anything that has to be done with the supplied information is js, so if you
run into problems, check the code PHP produces, if that's OK, ask on
c.l.javascript.

Grtz,
Hello Rik,

I am relatively new to both PHP and AJAX so pardon my simple question,
but how do you actually return the data that PHP processes back to the
page that made the AJAX request? Can you be more specific?

Thanks

Fred
Jul 22 '06 #3
"Fred Weinhaus" <fm*@alink.netwrote in message
news:fm***********************@comcast.dca.giganew s.com...
In article <3e***************************@news2.tudelft.nl> ,
"Rik" <lu************@hotmail.comwrote:
Fred Weinhaus wrote:
Can anyone point me to some good online literature about communicating
between PHP and AJAX. Are there any libraries that would allow PHP to
send back request information to the calling HTML page?

There's absolutely no difference between calls from AJAX and normal
browser
calls as far as PHP is concerned. It's just another request. No
difference
to PHP. Let PHP output the needed text/HTML/XHTML/XML, and process it
with
javascript.

Anything that has to be done with the supplied information is js, so if
you
run into problems, check the code PHP produces, if that's OK, ask on
c.l.javascript.

Grtz,

Hello Rik,

I am relatively new to both PHP and AJAX so pardon my simple question,
but how do you actually return the data that PHP processes back to the
page that made the AJAX request? Can you be more specific?

Thanks

Fred
Google for xajax

Norm
Jul 22 '06 #4
A good ajax library I use with PHP is the moo.ajax from the moo.fx
package. Its simple and small (1kb).

Check out http://moofx.mad4milk.net/

To use it, include the moofx scripts in your header.

<script type="text/javascript"
src="/moo.fx/scripts/prototype.lite.js"></script>
<script type="text/javascript"
src="/moo.fx/scripts/moo.ajax.js"></script>

Then embed JS where needed..

<p id="foobar"><a href="#" onclick="new ajax('hello.php', {update:
$('foobar')});">Click Me</a></p>

Then create your PHP page that will communicate with the AJAX...

eg. hello.php....

<?php
echo "hello world";
?>

And thats it!

Fred Weinhaus wrote:
Can anyone point me to some good online literature about communicating
between PHP and AJAX. Are there any libraries that would allow PHP to
send back request information to the calling HTML page?

Thanks

Fred Weinhaus
Jul 22 '06 #5
Fred Weinhaus <fm*@alink.netwrote:
>
I am relatively new to both PHP and AJAX so pardon my simple question,
but how do you actually return the data that PHP processes back to the
page that made the AJAX request? Can you be more specific?
The AJAX code makes a new request. PHP returns data exactly as if it were
responding to a normal web request.
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Jul 22 '06 #6
On Fri, 21 Jul 2006 18:31:55 -0700, Fred Weinhaus <fm*@alink.net>
wrote:
>Can anyone point me to some good online literature about communicating
between PHP and AJAX. Are there any libraries that would allow PHP to
send back request information to the calling HTML page?
I guess there's a lot of stuff out there now for this, but SAJAX works
really well for me:

http://www.modernmethod.com/sajax/

Ken
Jul 23 '06 #7
When I was looking at AJAX tutorials I found a few good ones on
http://www.hotscripts.com/ but they take a bit of finding.

Jul 23 '06 #8
Fred Weinhaus wrote:
Can anyone point me to some good online literature about communicating
between PHP and AJAX. Are there any libraries that would allow PHP to
send back request information to the calling HTML page?

Thanks

Fred Weinhaus
Fred;

Also take a look at www.mybic.org as well.
Jul 24 '06 #9
bobmct wrote:
Fred Weinhaus wrote:
>Can anyone point me to some good online literature about communicating
between PHP and AJAX. Are there any libraries that would allow PHP to
send back request information to the calling HTML page?

Thanks

Fred Weinhaus

Fred;

Also take a look at www.mybic.org as well.
Sorry but www.mybic.org is a bad address.

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________ ________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Jul 24 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Yarco | last post by:
I want to use "Ajax" to create my web for hobby. But i don't know whether "Ajax" is mature... And what about with php? Someone have experience on it? ....
4
by: bobzimuta | last post by:
I'm creating a simple AJAX library. It's an object that will return an array containing the response text or xml. I'm trying to find a way to assign the response as a property of the object, but...
0
by: melledge | last post by:
Ajax Developers' Day added to XTech 2006 agenda XTech 2006 - 17-19 May - Hotel Grand Krasnopolsky - Amsterdam, The Netherlands
0
by: melledge | last post by:
Ajax Developers' Day to Kick Off XTech 2006 Conference Industry experts offer insight into next generation of the Web ALEXANDRIA, VIRGINIA, USA - April 25, 2006 - In response to the rapidly...
1
by: www.web20developers.com | last post by:
http://www.web20developers.com http://www.web20developers.com/index.php?option=com_content&task=view... Ajallerix : AJAX, simple, fast Web image gallery demo ; at Novell AJAX -...
10
by: =?Utf-8?B?WWFua2VlIEltcGVyaWFsaXN0IERvZw==?= | last post by:
controlsPlease could some of you here post some of your live examples of AJAX (esp drag panels, collapsable panels, and popup menu.) (It's one thing to talk about how great something is, but it's...
2
by: soni2926 | last post by:
hi, does anyone know of any good books on ajax and asp.net, one that teaches ajax itself before jumping in atlas? I wanted to get an understanding of ajax and how to use it, most books i've seen...
1
by: shaunwo | last post by:
I'm an AJAX / DOM Novice (at best) and trying to figure out how to write the value to a couple input fields. I don't remember exactly where I got the ajax.js file I'm using from (went to the website...
11
by: =?Utf-8?B?R2VyaGFyZA==?= | last post by:
I have run into a situation that if a page/tab that uses the Ajax toolkit (using .net version 3.5) is closed before the Ajax enable controls complete loading, then IE locks up. Does it in both IE7...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.