10-22-2007, 11:08 PM
|
#2 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
To answer them in order! It's definitely possible to have it update your database without reloading. As for an example, really you'll want to download the popular Javascript framework, Prototype, and give that a whirl with its AJAX features. As well as all the other features it has to offer! It's really easy to use with AJAX. It will give you plenty of examples on the Prototype website.
You don't really have to include external files anyway - just your external Javascript file, although technically this could also be incorporated in your PHP file - just not very coder-friendly. The PHP file that you call when you make your AJAX call can also feasibly be the same file you make the call from - it's just you'll have to configure it a different route of execution for when the page loads when you're accessing it via AJAX as to when you normally access it - you can do this by setting a URL parameter, for instance. However, I load separate files to make the code more easy to manage.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
|
|
|