Learning AJAX with Passion

آموزش آجاکس

Google
 

Thursday, December 21, 2006

XMLHttpRequest object properties

Property Description

onreadystatechange : Determines the function called when the objects readyState changes.

readyState : An integer from 0. . .4. (4 denotes the call is complete.)

ponseText : Data returned from the server as a text string (read-only).

responseXML : Data returned from the server as an XML document object (read-only).

status : HTTP status code returned by the server

statusText : HTTP status phrase returned by the server mpleted, and then check the status to see if it executed without an error. (We’ll see how to do this shortly.)

XMLHttpRequest object methods

Method Description

abort() : Stops the current operation.

getAllResponseHeaders() : Returns all headers as a string.

getResponseHeader(x) : Returns header x as a string.

open(‘method’, ’URL’, asyn) : Specifies the HTTP method to be used (GET or POST as a string, the target URL, and whether or not the request should be handled asynchronously (asyn should be true or false, if omitted, true is assumed).

send(content) : Sends the data for a POST request and starts the request, if GET is used you should call send(null).

tRequestHeader(‘x’,‘y’) : Sets a parameter and value pair x=y and assigns it to the header to be sent with the request.

[The open object method is used to set up the request, and the send method starts the request by sending it to the server (with data for the server if the POST method is used).]

مشکلات آجاکس

جاوا اسکريپت حتما بايد فعال باشد
نياز به آموزش کاربران
بي اثر بودن دکمه Back
تعويض لينک ها با GET Request
تغييرات ناگهاني در قسمتهايي از صفحه
عدم داشتن لينک مشخص و در نتيجه عدم امکان Bookmark
دعوت اجباري مرورگرها براي پشتيباني از ابزارهاي جديد
ارسال تغييرات در پس زمينه بدون اطلاع کاربر مثلا در فرمها
عدم امکان مرور سايت به صورت Offline
عدم نمايش وضعيت انتظار در نشانگر مخصوص هر مرورگر
عدم امکان ثبت صفحات در جستجوگرها
ارسال اطلاعات مهم در وضعيت قابل رويت = نداشتن امنيت کافي

Ajax Library

کتابخانه‌هاي آجاکس مالتي پلاتفرم

CPAINT - يک کتابخانه کامل برنامه نويسي براي پياده سازي آجاکس در PHP‌ و ASP
GeneXus - توليد برنامه‌هاي آجاکسي با استفاده از جاوا يا ASP.NET
WebORB - پلاتفرم جاوايي و دات نتي براي براي برنامه‌هاي مبتني بر AJAX
JackBe - آجاکس براي محيطهاي Enterprise