Ajax object calls?

Hi, i have looked into using ajax with php and it looks simple enough however, i want to use ajax to update a figure that is generated using many object calls.

From what i can tell use of ajax in php is fairly trivial using a small script that is external to the core of the program. I just want to know if i can use ajax to call objects.

I think i could make it do what i want but i would have to copy a lot of code and set it out linearly which i defininatly dont want.


Everything you can do with a normal website request you can also do with AJAX.
It’s just a different way of calling it, but the fact that you call a website via AJAX doesn’t put any restrictions on PHP whatsoever.

Does that help?

Yeah thanks, now i know its possible, i though Ajax was relatively restricted to quite small actions.

If anyone could share some helpful links, that would be amazing.

Ajax is just away of doing a HTTP GET or POST request to a script.
That script could be the same one that handles existing page requests, or anything really.

That PHP script can instantiate whatever objects it needs and do whatever work is necessary.

Usually the output will be different though, you might be returning a simple piece of text, JSON, XML or HTML markup but probably not a whole page with a Doctype right through to </html>