Advertisement
Advertisement
| 03.18.2008 at 07:04AM PDT, ID: 23250194 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Ajax Testing</title>
<script type="text/javascript" language="javascript">
/* Check browser support for XMLHttpRequest object */
function createXMLHttpRequest(){
var request = false;
/* Does this browser support the XMLHttpRequest object? */
if (window.XMLHttpRequest) { // Mozilla, Safari, ...
if (typeof XMLHttpRequest != 'undefined') {
/* Try to create a new MXLHttpRequest object */
try {
request = new XMLHttpRequest();
} catch (e) {
request = false;
}
}
/* Does this browser support the ActiveX objects? */
} else if (window.ActiveXObject) { // IE
/* Try to create a new ActiveX XMLHttp object */
try {
request = new ActiveXObject('Msxml2.HMLHTTP')
} catch(e) {
try{
request = new ActiveXObject('Microsoft.XMLHTTP');
} catch (e) {
request = false;
}
}
}
return request;
}
function requestData(p_request, p_URL, p_data, p_func, p_method) {
/*Does the XMLHttpRequest object exists? */
if (p_request) {
/* Is the posting method 'GET'? */
if (p_method == 'GET') {
p_request.open('GET', p_URL + '?' + p_data, true);
} else {
p_request.open('POST', p_URL, true);
}
p_request.onreadystatechange = function() { parseResponse(p_request); };
/* Is the posting method 'GET'? */
if (p_method == 'GET') {
p_request.send();
} else {
p_request.send(p_data);
}
} else {
alert('Browser does not support XMLHttp object');
}
}
function parseResponse(request) {
/* Is the /readyState/ 4? */
if (request.readyState == 1){
document.getElementById('list').innerHTML = 'Loading...';
/* Is the /readyState/ 4? */
} else if (request.readyState == 4) {
/* Is the /status/ 200? */
if (request.status == 200){
/* Grab the /responseText/ from the request (XMLHttpRequest) */
var response = request.responseXML;
var paramList = response.getElementsByTagName('name');
/* This will be the XHTML string to use */
var out = '<ul>';
for (i = 0, il = paramList.length; i < il;){
out += '<li>' + paramList[i++].firstChild.nodeValue + '</li>';
}
out += '</ul>';
document.getElementById('list').innerHTML = out;
} else {
alert('There was a program retrieving the data: \n' + request.statusText);
request = null;
}
}
}
function simpleRequest() {
var p_request = createXMLHttpRequest();
var pURL = 'ajaxed.cfm?z='+new Date().getTime();
var pdata = '';
var p_func = parseResponse;
var p_method = 'GET';
requestData(p_request, pURL, pdata, p_func, p_method);
}
</script>
</head>
<body>
<span
style="cursor: pointer; text-decoration: underline"
onclick="simpleRequest()">
Make a request
</span>
<div id="list">list</div>
</body>
</html>
|