So there are multiple objects to test for but the tests I've tried don't seem to work in Opera 7.54...
Code: Select all
if (XMLHttpRequest) {alert('yes');}else if (!XMLHttpRequest) {alert('no');}Moderator: General Moderators
Code: Select all
if (XMLHttpRequest) {alert('yes');}else if (!XMLHttpRequest) {alert('no');}Code: Select all
if (typeof XMLHttpRequest == 'undefined')
alert('no');
else
alert('yes');Code: Select all
if (window.XMLHttpRequest)Code: Select all
var ajax;
var ajaxSupported = true;
try {
ajax = new XMLHttpRequest();
}catch (e){
try {
ajax = new ActiveXObject('Msxml2.XMLHTTP');
}catch (e){
try {
ajax = new ActiveXObject('Microsoft.XMLHTTP');
}catch (e){
ajaxSupported = false;
}
}
}