Created
February 23, 2012 13:27
-
-
Save cou929/1892784 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function startSuccessfullGetTest() { | |
var output = document.getElementById('output'); | |
if (!output) { | |
return; | |
} | |
function log(text) { | |
if (output && typeof output.innerHTML !== 'undefined') { | |
output.innerHTML = text; | |
} else { | |
document.write(text); | |
} | |
} | |
try { | |
if (tddjs.ajax && tddjs.ajax.get) { | |
var id = new Date().getTime(); | |
tddjs.ajax.get('fragment.html?id=' + id, { | |
'success': function(xhr) { | |
log(xhr.responseText); | |
} | |
}); | |
} else { | |
log('Browser does not support tddjs.ajax.get'); | |
} | |
} catch (x) { | |
log('An exception occured: ' + x.message); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment