Page 1 of 1

Question with AJAX

Posted: Sun Nov 05, 2006 5:18 pm
by akimm
XMLHttpRequest object, how do I know whether or not I can use this, do I need to enable anything special, or will my server most likely already have this available.

Sorry if this is a stupid question, I'm honestly just begining an Ajax book, and finally figured out how it all works, for the most part at least.

Re: Question with AJAX

Posted: Sun Nov 05, 2006 5:37 pm
by Buddha443556
akimm wrote:XMLHttpRequest object, how do I know whether or not I can use this, do I need to enable anything special, or will my server most likely already have this available.
Your server shouldn't need anything but the browser client needs Javascript enabled. Server side it pretty much looks like any other request and all the normal security consideration are still there. HTTP_X_REQUESTED_WITH is usually set to something like "XMLHttpRequest" to distinguish it as such a request.
akimm wrote:Sorry if this is a stupid question, I'm honestly just begining an Ajax book, and finally figured out how it all works, for the most part at least.
Which book?

Posted: Sun Nov 05, 2006 6:10 pm
by akimm
Foundations of Ajax currently.

At my university they have subscription to something called books24/7 which basically is a server with tons of full text books, one of the most popular of these is technology based books. So I am juggling a few currently, but the aforementioned is my best source thus far.

Posted: Sun Nov 05, 2006 7:58 pm
by Buddha443556
akimm wrote:Foundations of Ajax currently.
Haven't actually read a book about Ajax. I just jumped in. Might just have to buy a copy of that, it's only $7, used, at Amazon. :)

Posted: Sun Nov 05, 2006 10:46 pm
by freefall
You only need the basic construct of the object and you're done. There is nothing else to Ajax.

Re: Question with AJAX

Posted: Sun Nov 05, 2006 11:39 pm
by aaronhall
akimm wrote:XMLHttpRequest object, how do I know whether or not I can use this, do I need to enable anything special, or will my server most likely already have this available.
XMLHttpRequest is a Javascript object, and resides on the client side. There are, however, differences in how you access the object depending on the client (namely Mozilla/Safari and IE). Check out http://developer.apple.com/internet/web ... tpreq.html -- the differences are outlined under "Creating the Object".

Posted: Mon Nov 06, 2006 7:23 am
by bokehman
freefall wrote:You only need the basic construct of the object and you're done. There is nothing else to Ajax.
Very true although many sources would try to have people think otherwise. The XMLHttpRequest object has nothing to do with PHP and does not even require any knowledge whatsoever of a server side language. It is just very basic Javascript; anything else is just padding.