Re: Re: PHP output fails from AJAX call
| From: | Christoph Michael Becker | Date: | Fri, 31 Jan 2014 00:01:42 +0000 |
| Subject: | Re: Re: PHP output fails from AJAX call | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-322784@lists.php.net to get a copy of this message | ||
Ashley Sheridan wrote:
> On Thu, 2014-01-30 at 22:51 +0100, Maciek Sokolewicz wrote:
>
>> On a sidenote: I would suggest installing and using JQuery for all this
>> kind of work. It makes making an ajax request and binding it to various
>> places in your code / design a LOT easier.
>
> +1 for jQuery, as it gets around the problem I highlighted earlier where
> different browsers implement ajax in different ways. jQuery unifies
> those methods into one call.
Um, the XMLHttpRequest object is rather ubiquitous nowadays, so there's
no need to fall back to ActiveX objects, unless support for IE 6 is
absolutely needed -- however, there are users who have JavaScript
disabled, so a pure HTML fallback is reasonable anyway. IMO, jQuery
doesn't really simplify Ajax requests, and particularly $.get() is
deceptive, because it doesn't offer an error parameter, so error
handling is easily overlooked.
--
Christoph M. Becker