- /********************************************************************************************************************
- Ajax script for I-look
- Created at: 2010.03.30
- Created by: Coolpet
- History:
- 2010-03-30 Created with easy data management
- ********************************************************************************************************************/
- var xmlhttp;
- var ajaxResponse;
- function ajaxRequest(data) {
- //Getting XmlHttp object
- if (window.XMLHttpRequest) xmlhttp = new XMLHttpRequest(); // code for IE7+, Firefox, Chrome, Opera, Safari
- if (window.ActiveXObject) xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); // code for IE6, IE5
- if (xmlhttp==null) alert ("Your browser does not support XMLHTTP!");
- var url;
- url = "somemagicintheair.php";
- url=url+"?"+data;
- url=url+"&sid="+Math.random();
- xmlhttp.open("GET",url,false);
- xmlhttp.send(null);
- xmlhttp.onreadystatechange = stateChanged();
- }
- function stateChanged() {
- //State Description
- //0 The request is not initialized
- //1 The request has been set up
- //2 The request has been sent
- //3 The request is in process
- //4 The request is complete
- if (xmlhttp.readyState==4) {
- ajaxResponse = xmlhttp.responseText;
- return(ajaxResponse);
- }
- }
Undefined
By: coolpet | Date: Mar 31 2010 18:21 | Format: None | Expires: never | Size: 1.25 KB | Hits: 943
Latest pastes
1 hours ago
11 hours ago
1 days ago
2 days ago
2 days ago