johnnyb
05-02-2007, 09:39 PM
Hi,
I have some script like this:
// simplified to remove all the try/catches & stuff
function newXHR() {
request = new XMLHttpRequest();
XMLHttpRequest.prototype.requested = null;
return request;
}
then later:
function doRequest(url, callback) {
var req = newXHR();
req.requested = url;
// et cetera....
}
This works fine in Firefox, however the line 'req.requested = url'; causes an error in IE7, (I haven't tested IE6 yet). The error is 'Object doesn't support this property or method'
So, this leads me to believe that either a) XMLHttpRequest.requested is not writable, or, b) XMLHttpRequest.requested was never created in the first place. I think it's the first option because I'm not getting an error in the newXHR() function.
I've been searching for some documentation on this but I can't seem to find anywhere if properties created with the prototype keyword are writeable in IE. Does anyone know what the problem is?
Thanks,
John
I have some script like this:
// simplified to remove all the try/catches & stuff
function newXHR() {
request = new XMLHttpRequest();
XMLHttpRequest.prototype.requested = null;
return request;
}
then later:
function doRequest(url, callback) {
var req = newXHR();
req.requested = url;
// et cetera....
}
This works fine in Firefox, however the line 'req.requested = url'; causes an error in IE7, (I haven't tested IE6 yet). The error is 'Object doesn't support this property or method'
So, this leads me to believe that either a) XMLHttpRequest.requested is not writable, or, b) XMLHttpRequest.requested was never created in the first place. I think it's the first option because I'm not getting an error in the newXHR() function.
I've been searching for some documentation on this but I can't seem to find anywhere if properties created with the prototype keyword are writeable in IE. Does anyone know what the problem is?
Thanks,
John