>All Tutorials 
Ajax and .NET Ajax and .NET RSS XML
Ajax and ColdFusion Ajax and ColdFusion RSS XML
Ajax and Java Ajax and Java RSS XML
Ajax and PHP Ajax and PHP RSS XML
Ajax and SOA Ajax and SOA RSS XML
Ajax Goodies Ajax Goodies RSS XML
Ajax Tool Ajax Tool RSS XML
Facebook MockAjax Facebook MockAjax RSS XML
Google Web Toolkit Google Web Toolkit RSS XML
JavaScript Framework JavaScript Framework RSS XML
Ruby on Rails Ruby on Rails RSS XML
Technique Introduction Technique Introduction RSS XML
Without XMLHttpRequest Without XMLHttpRequest RSS XML
Yahoo! UI Yahoo! UI RSS XML

AJAX Chat Tutorial Part 5: The Javascript, Sending Chat Messages, Screen Name Changes - php zend function chat screen javascript ajax part

 
Registered tutorials: 501
Registered Users: 32529



Rating: 4 out of 2 votes cast


  
Category: JavaScript Framework

AJAX Chat Tutorial Part 5: The Javascript, Sending Chat Messages, Screen Name Changes

Digg this   Post to del.icio.us

Abstract: This tutorias shows how to create and use the XMLHttpRequest object to grab the information from the backend script using a saveMessage call from a form button

Sending Chat Messages

One aspect of writing AJAX enabled applications is that one can no longer pass off Javascript as an afterthought. If you're intent on creating dynamic web applications using AJAX, visual effects, and funky new age interfaces then you'll just have to start recognising that Javascript is going to be a primary development language.

An introduction to Javascript is out of this tutorial's scope, but I'll hit the high points as I move along.

Initiating an XHR Request

XMLHttpRequest (hereafter dubbed "XHR") is a native browser object in most modern browsers with the exception of Internet Explorer 6 where it is an ActiveX object. It allows a scripting language like Javascript to create background connections to the server which do not reload the current web page. Because accessing the XHR is a complicated process, I'll skip the fine details and introduce Prototype's Ajax.Request class which buries the detail behind a simple interface.

Using AJAX with Prototype is covered in detail at http://www.sergiopereira.com/articles/prototype.js.html#UsingAjax.


Read Full Tutorial...



Reviews:

Rate and Review This Site

No reviews yet


Statistic Information About this Resource:


Total Hits: 246
Unique Hits: 217


  Daily Weekly Monthly
  Unique Total Unique Total Unique Total
Average 0.3 0.3 3.2 3.5 13.5 15.5
Current 0 0 1 1 11 13
Previous 0 0 0 0 23 27
Nov 19 0 0 3 3 13 17
Nov 18 0 0 0 0 21 26
Nov 17 1 1 5 6 13 14
Nov 16 0 0 0 0 18 21
Nov 15 1 1 4 5 0 0
Nov 14 1 1 3 3 24 25
Nov 13 0 0 10 10 7 7
Nov 12 0 0 6 7 5 5
Highest 4 4 10 10 24 27


Script Execution Time: 1.03549 | SQL Queries: 10 | Members: 501
Ajax Tutorial Top List - Powered by Aardvark Topsites PHP 5.1.2