Difference Between Constant and ReadOnly

Here I will explain the difference between Constant, ReadOnly and Static with example or can we marked it as static or not or how to declare it and where we can change their values with example. Const Keyword 1) A const filed must be initialized or assigned a value at the time of variable declaration and […]

Read More

What are the advantages and disadvantages of AJAX?

Here we will learn what is ajax and what are their advantages and disadvantages of AJAX. AJAX  AJAX is Asynchronous JavaScript And XML. The XmlHttpRequest is an actual object which works behind the scene. Ajax implementation uses JavaScript functions to call methods from a webservice, webpage request in response to get response. Response data is […]

Read More

Abort Ajax requests using jQuery

Most of the jQuery Ajax methods return an XMLHttpRequest (or the equivalent) object, so you can just use abort(). Example: var xhr = $.ajax({ type: “POST”, url: “some.php”, data: “name=John&location=Boston”, success: function(msg){ alert( “Data Saved: ” + msg ); } }); //kill the request xhr.abort() As of jQuery 1.5 the returned object is a wrapper […]

Read More

Autocomplete with XML

Here I will explain how to use Autocomplete with xml data. Basically Autocomplete provides a list of suggestions while you type into the field. It prevents the user from having to enter an entire word or a set of words. In below example i will show how to bind xml data in autocomplete textbox. CS […]

Read More

Important methods of XMLHttpRequest

abort()Cancels the current request. getAllResponseHeaders()Returns the complete set of HTTP headers as a string. getResponseHeader( headerName )Returns the value of the specified HTTP header. open( method, URL )open( method, URL, async ) open( method, URL, async, userName ) open( method, URL, async, userName, password ) Specifies the method, URL, and other optional attributes of a […]

Read More

What is difference between jQuery.get() and jQuery.ajax() method?

$.ajax() is the most configurable one, where you get fine grained control over HTTP headers and such. You’re also able to get direct access to the XHR-object using this method. Slightly more fine-grained error-handling is also provided. Can therefore be more complicated and often unecessary, but sometimes very useful. You have to deal with the […]

Read More