Shortest way to create an XMLHttpRequest object

For best results use a framework – like jx

http = window.XMLHttpRequest ? new window.XMLHttpRequest : (window.ActiveXObject ? new ActiveXObject("MSXML2.XMLHTTP"): null);

Original Article
[tags]javascript,ajax,code,xhr[/tags]

Author: Binny V A
A philosopher programmer who specializes in backend development and stoicism.

1 thought on “Shortest way to create an XMLHttpRequest object

  1. Hi Binny

    can u give me some examples for ajax validation, i need to validate 4 fields (using ajax) when user submits the form.

Leave a Reply

Your email address will not be published. Required fields are marked *