Getting Started

  • Revision slug: Talk:AJAX/Getting_Started
  • Revision title: Getting Started
  • Revision id: 101369
  • Created:
  • Creator: Tryst
  • Is current revision? No
  • Comment Some questions about the article

Revision Content

Just a few notes to make on this...

I am new to this whole AJAX thing, so forgive me if i am pointing out something obvious.

1) When we are calling the open method of the http_request instance (http_request.open()) why are we specifing 'POST' as the HTTP method as the first parameter? Shouldn't it be 'GET' if we are to pass it a URL with a querystring? (as shown in the article)

2) Also, I am confused as to exactly how the server response is to send data back? Will the requested page on the server do processing depending on the data in the querystring it is passed, and then return this data? If so, how is the data passed back? Or does the whole content of a page (eg HTML) get sent back for the JS function to process?

An example of a called page sitting on the server in which the http_request object function is calling would have been useful.

Thanks

Tryst

Revision Source

<p>Just a few notes to make on this...
</p><p>I am new to this whole AJAX thing, so forgive me if i am pointing out something obvious.
</p><p>1) When we are calling the open method of the http_request instance (http_request.open()) why are we specifing 'POST' as the HTTP method as the first parameter? Shouldn't it be 'GET' if we are to pass it a URL with a querystring? (as shown in the article)
</p><p>2) Also, I am confused as to exactly how the server response is to send data back? Will the requested page on the server do processing depending on the data in the querystring it is passed, and then return this data? If so, how is the data passed back? Or does the whole content of a page (eg HTML) get sent back for the JS function to process?
</p><p>An example of a called page sitting on the server in which the http_request object function is calling would have been useful.
</p><p>Thanks
</p><p>Tryst
</p>
Revert to this revision