Javascript

What is ajax Ajax (Asynchronous Javascript and XML) – a solution that allows asynchronous request / transfer data to the server. The very idea is not to restarting the web page and not blocking the user interface could be of javascript-script to apply to any server-side script (or other resersu) to get / send any data. Examples ajax examples web page using ajax is now possible to find many. If you go on and start something enter a search string, you can drop down menu will appear with similar variants found Query. These options from the server asynchronously, without the page itself. What is jQuery to implement ajax-requests Browsers are built components that can be accessed from the javascript-code. There is one annoying problem. Code to create ajax-object in ie (Internet Explorer), differs from the code ajax-create the object in other browsers.

This is perhaps not the biggest challenge. For example, I really do not want to think about the different settings and low-level implementations of ajax. jQuery eliminates the above problems , providing a very user-friendly interface. I must say that the use of the library goes far beyond just a convenient implementation of ajax-scripts. Ajax, jQuery and php In this article I will examine a fairly simple but complete example of how to create a Web page with ajax asynchronous requests to the server.

So, let's proceed. You must create a page that will be placed button. Clicking on this button to request data from the php-script and display them on stranitse.Neobhodimo also show animations while loading data in the form gif-image. For simplicity, we assume that data sharing will be implemented in json-format. Immediately bring design directory hierarchy on my server. Here it is. Fig.1 The structure of directories on the server code page html-www / index.html



Both comments and pings are currently closed.