On my #secretProject (#wmps) we need a file upload progress meter, and I'd rather not use one of the flash based solutions (that are apparently breaking like heck under Flash 10). There's a couple tutorials out there demonstrating this, Rasmus', as well as a great one at IBM. My issue was both was that they were using Ajax libraries (it's kind of hidden in the IBM one, it ends up relying on some functionality from Google Maps that I don't really understand).
This is a demonstration of a very fast and easy way to build AJAX-type applications where communications between JavaScript on the client side and PHP5 on the server side is ideal. This library makes development of such systems fast and very simple.
Updating the user list should occur whenever the user adds a new chat message or refreshes the chat window. Since we already use the MessageAction() method on our PHP IndexController class to forward such responses to the browser, we'll simply amend it to also return a list of currently online users. To assess which users are online we may assume each screen name is a separate user. This isn't accurate since a user may change screen names as many times as they wish but will suffice for now. If we maintain the current application design we could improve this by using the PHP Session id as the basis to narrow screen names down to unique users. If we used a database and enforced user accounts, this would not be an issue.
We'll also assume an online user is one who has submitted a message in the previous five minutes. Since both screen names and message timestamps are stored in our XML file, we can use XPATH to capture the necessary data.
This is a two-part article. In these two parts I'll try to describe what AJAX is, and how to use AJAX in PHP and JSP. Later we will use some advanced JSP tag libraries to make cool AJAX-based web applications.
Please remember, AJAX is not a new programming language, so you don't have to learn anything new. AJAX involves just using the existing standards (JavaScript and XML) in a different way. AJAX became popular because of Google in 2005. AJAX becomes a common ingredient in web 2.0-based web applications.
Why do we need AJAX? Often web-based applications are not as user-friendly as desktop applications. Using AJAX, we can create a feature-rich and easy-to-use graphical user interface for web applications. AJAX is supported by most of the web browsers available today.
Have you guys ever seen the edit button on vbulleten boards or the edit comments button on digg, which allows the user to seamlessly edit their content without reloading the page. Well, we are going to implement the same AJAX edit-in-place functionality in this tutorial.
Suppose we have an article page on our site where people can edit articles. The article has an edit and save button which allows the user to edit the article and save the changes as necessary. View the ajax_edit_in_place demo to see what I'm talking about.
To accomplish the editing and saving feature in AJAX, we're going to make use of Prototype AJAX library. It's a single javascript file called prototype.js.
Prototype is a powerful library with all the necessary functions we need to build an AJAX driven applications. If you're looking to get started with AJAX, i recommend you look into using Prototype API. I've written this tutorial which will help you get started with PHP and AJAX using Protoype lib..
AJAX is a very powerful system which enables dynamic, constantly changing content on a page--without refreshing the page. This useful system does, however, have some limitations with current browsers. We will cover these limitations in this article, specifically those pertaining to how HTML Forms operate within AJAX dynamic content and what type of JavaScript can be used in AJAX-generated content.
In Part 1 and 2 of this series on AJAX, we gave you a good understanding of how AJAX works. Now we will use a slightly different approach to doing the Asynchronous data send/receive with AJAX--we will use the POST method instead of the GET method!
AJAX and PHP 5 both have powerful features for processing and using an XML document. XML is a method of formatting data, often for communication purposes, between different computer systems. In this article, we will show you how to access an XML document with AJAX!
So you're interested in AJAX? AJAX is a powerful addition to JavaScript for browser-to-server intercommunication. We will demonstrate a simple script that sends a GET or POST request to a form handling script on a server, then the server script will return a response to the browser XMLHttpRequest JavaScript object.
Dieses Tutorial stellt die Grundlagen von Ajax vor. Dabei wird PHP als serverseitige Grundlage genutzt.
Ein allgemeiner Abschnitt erklärt das Funktionsprinzip von Ajax. Der auf der Seite des Servers werden XML Dateien und Json Rückgaben erzeugt. Dabei werden verschiedenste Pear Klassen verwendet.
Ein Blick in dieses Ajax Tutorial lohnt sich.
Tutorial kommentieren Defekten Link melden
Holger Bartz schreibt:
Im Prinzip gut für den Einstieg. Leider werden aber Techniken des Cross-Side-Scripting verwendet, die jeder vernünftige Browser unterdrückt. Außerdem muss man noch die Soap Library installiert haben.
Man muss also einige Kopfstände machen, die gar nichts mit Ajax zu tun haben, um das Beispiel zum laufen zu kriegen und das ist gar nicht gut.








