Wednesday, December 31, 2014

Blogger Template By: MKR | IVYthemes.com


Each of the developers faced with the need to use asynchronous data exchange on the page (AJAX), this technology helps to upload content to the page without reloading. AJAX (Asynchronous Javascript and XML) - approach to building interactive user interfaces, web applications, which consists in "background" data-sharing browser from a web server. As a result, when data is updated web page is not reloaded completely, and web applications become faster and more convenient. Installation powerful JS (JavaScript) libraries shipping containers for sale uk are not always justified, and not always necessary. Therefore, I suggest you one of the easiest options for asynchronous data exchange on the page. In my version of a file with the following shipping containers for sale uk contents ajax.js: function shipping containers for sale uk newContent (link, target) {/ * link - URL address of the page loaded target - DIV which we load content * / var contaner = document .getElementById (target); contaner.innerHTML = 'Loading ...'; shipping containers for sale uk var resource = getRequest (); if (resource) {resource.open ('get', shipping containers for sale uk link); resource.onreadystatechange = function () {/ * Gets a value indicating the current state of the control * / if (resource.readyState == 4) {contaner.innerHTML = resource.responseText; }} Resource.send (null); } Else {document .location = link; }} / * Function to get the method to work with browsers * / function getRequest () {try {return new XMLHttpRequest ()} catch (e) {try {return new ActiveXObject ('Msxml2.XMLHTTP')} catch (e) { try {return new ActiveXObject ('Microsoft.XMLHTTP')} catch (e) {return null; } Z}}} * This source code was highlighted with Source Code Highlighter. Call to html is done as follows (index.html): <html> <head> <script type = "text / javascript" shipping containers for sale uk src = "ajax.js"> shipping containers for sale uk script> head> <body> <a href = "" onclick = "newContent ('newcontent.html', 'TARGET')"> Insert content file in newcontent.html divas TARGET a> <div id = "TARGET"> div> body> html> * This source code was highlighted with Source Code Highlighter shipping containers for sale uk . That's actually a small, simple solution.
2014 (6) June (2) March (1) January (3) 2013 (15) December (4) November (1) July (1) April (4) March (1) February (4) 2012 (4) September (1) August (1) May (1) February (1) 2011 (20) December (2) November (1) September (1) August (2) June (3) April (4) March (2) January (5) 2010 (1) April (1) 2009 (26) December (1) November (3) September (1) AJAX uploading content to the specified DIV July (2) May (6) April (11) March (1) February (1) 2008 (7) May (2) April (1 ) March (4)
Google lives Internet JavaScript PHP linux IT-news CSS + HTML of my work kohana photo Autocomplete Bootstrap Chrome MySQL National Geographic jQuery world of tanks online Debian HP Mandriva jTable windows 8 windows 8.1
Blogger Template By: MKR | IVYthemes.com

No comments:

Post a Comment