Lowongan Kerja

Galleri Foto Artis

Gallery Tattos

Tabular Information and Forms

With the server side taken care of, there are three ways to proceed with developing on the client side. The first is to continue developing the way that we've been developing, hand-coding every function. Although this would give us a really good understanding of how the application works, it would take forever to develop anything useful.
The second approach is to get online and find a suitable Ajax library, download it, and proceed with developing. Currently, quite a number of them are out there, such as Sarissa and JSON (pronounced "Jason"). (However, if memory serves, Jason was the leader or the Argonauts, whereas Ajax was a hero of the Trojan War.)
The third possibility is to write our own Ajax libraryor, rather, use one that I've already written. This approach is useful for several reasons, the first being that I'll (hopefully) know exactly how the library works. The second reason is that I can dissect them in a later chapter so that we'll know exactly how they work. The final reason is that it will help to pad the page counteh, I mean, to increase the depth of these examples. Table 8-2 briefly describes the classes in the library, along with their associated methods and properties.
Table 8-2. Ajax Library Classes Name
Parent Class
Type
Description
XMLHttpRequest
Class
Constructor
action
XMLHttpRequest
Property
GET, POST, or HEAD
asynchronous
XMLHttpRequest
Property
true or false
envelope
XMLHttpRequest
Property
SOAP envelope
readyState
XMLHttpRequest
Method
Returns the document readyState
getresponseHeader
XMLHttpRequest
Method
Returns a single HTTP response header
getAllResponseHeaders
XMLHttpRequest
Method
Returns all HTTP response headers
responseText
XMLHttpRequest
Method
Returns the SOAP response as text
responseXML
XMLHttpRequest
Method
Returns the SOAP response as an XML document
stateChangeHandler
XMLHttpRequest
Method
Dummy state change handler
setRequestHeader
XMLHttpRequest
Method
Sets an HTTP response header
removeRequestHeader
XMLHttpRequest
Method
Removes a previously set HTTP response header
Send
XMLHttpRequest
Method
Sends the XMLHttpRequest
Cache
Class
Constructor
insert
Cache
Method
Inserts a name/value pair
retrieve
Cache
Method
Retrieves a value
purge
Cache
Method
Purges one or more name/value pairs
names
Cache
Method
Returns an array of names
XMLDocument
Class
Constructor
Load
XMLDocument
Method
Loads an\ XML document
serialize
XMLDocument
Method
Serializes an XML document to text
DOMDocument
XMLDocument
Method
Returns an XML document
readyState
XMLDocument
Method
Returns the document readyState
setRequestHeader
XMLDocument
Method
Sets an HTTP response header
getresponseHeader
XMLDocument
Method
Returns a single HTTP response header
getAllResponseHeaders
XMLDocument
Method
Returns all HTTP response headers
setEnvelope
XMLDocument
Method
Sets the envelope for an XMLHttpRequest
selectNodes
XMLDocument
Method
Returns an array of XML nodes
SOAPEnvelope
Class
Constructor
envelope
SOAPEnvelope
Method
SOAP envelope
Now that the foundations of the application architecture have been covered, albeit lightly, this is a good time to see what the HTML page built upon that architecture looks like. Figure 8-6 shows what it looks like in a browser, and Listing 8-19 shows the HTML and JavaScript.


Related Posts



0 comments:

Post a Comment

 

Networking

FOREX TRADER

Sexi Women

Copyright © Free ebooks Download | Powered by Blogger | Template by Blog Go Blog