From what i can tell from that, its basicly a call in the PHP that 
deals with the submitted data depending on how the form has been submitted.

So if the user has JS enabled on the browser they can have nice fancy 
error checking via AJAX and if not they can get some nice standard PHP 
based error check thrown in.

Looks good :) thanks for your help guys, im getting there slowly

Rey Bango wrote:

>Hi Klaus,
>
>Could you elaborate on this a little more? I'm not clear on what you 
>mean by this. I'm all for "best practices" and I'm definitely interest 
>in this.
>
>Thanks,
>
>Rey...
>
>  
>
>>Here's another tip (to promote good practice right from the beginning): 
>>Every Ajax call by jQuery sends a  special request header, upon which 
>>you can decide what to do, i.e. deliver the complete page or deliver 
>>only a part in the response.
>>This is especially useful if you want to hijax your forms, so that they 
>>both work with and without Ajax/JavaScript.
>>
>>You can check that in PHP like:
>>
>>if ( $_SERVER["HTTP_X_REQUESTED_WITH"] == "XMLHttpRequest") {
>>     // handle XHR request
>>
>>} else {
>>     // handle standard request
>>
>>}
>>
>>Cheers, Klaus
>>
>>
>>
>>
>>
>>
>>_______________________________________________
>>jQuery mailing list
>>discuss@jquery.com
>>http://jquery.com/discuss/
>>
>>    
>>
>
>_______________________________________________
>jQuery mailing list
>discuss@jquery.com
>http://jquery.com/discuss/
>  
>


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to