michaellunsford Posted December 4, 2007 Share Posted December 4, 2007 I've googled this, but I just can't figure out what in the world it could be. Firefox says: Object cannot be created in this context" code: "9 the code responsible is the "http.send();": function sndReq(action) { http.open('get', 'imagelist.php?action='+(action?action:"")); http.onreadystatechange = handleResponse; http.send(); } if you want to see it in action, you can do so here: http://68.228.8.85/timesphotocontest/ What is this error, and how do I make it go away? Quote Link to comment Share on other sites More sharing options...
priti Posted December 28, 2007 Share Posted December 28, 2007 I've googled this, but I just can't figure out what in the world it could be. Firefox says: Object cannot be created in this context" code: "9 the code responsible is the "http.send();": function sndReq(action) { http.onreadystatechange = handleResponse; http.send(); } if you want to see it in action, you can do so here: http://68.228.8.85/timesphotocontest/ What is this error, and how do I make it go away? Hello , kindly check http.open('get', 'imagelist.php?action='+(action?action:"")); line of code for proper formation of URL and secondly, when we make a get request write http.send(null). Regards Quote Link to comment Share on other sites More sharing options...
michaellunsford Posted December 28, 2007 Author Share Posted December 28, 2007 Thanks for the reply, but I've still got the same error. kindly check http.open('get', 'imagelist.php?action='+(action?action:"")); line of code for proper formation of URL yes, it is properly formed. if it was not, i would think no images would show up on the page at all. In fact, if I put a complete URL (not the IP address) I get Permission denied to call method XMLHttpRequest.open, and no images appear. and secondly, when we make a get request write http.send(null). Adding "null" is just like leaving it blank. Just for fun, I added "null" and I continue to get "Object cannot be created in this context" I've also re-lived the page so you can see what it's doing. http://68.228.8.85/timesphotocontest/ Thanks, Quote Link to comment Share on other sites More sharing options...
priti Posted December 29, 2007 Share Posted December 29, 2007 hello dear, I was debugging the issue and i see some detailed error Error: uncaught exception: [Exception... "Object cannot be created in this context" code: "9" nsresult: "0x80530009 (NS_ERROR_DOM_NOT_SUPPORTED_ERR)" location: "http://content.gannettonline.com/global/s_code/s_code.js Line: 446"] kindly in to s_code.js.I think you should try to remove error with s i.e s has no properties http://www.timesofacadiana.com/scripts/s_local_customization.js Line 2 there is something related with this s. kindly share if you are able to solve or else let me know what this 's' is all about which is causing second error. regards Quote Link to comment Share on other sites More sharing options...
michaellunsford Posted December 29, 2007 Author Share Posted December 29, 2007 Wow, I can't believe it. That second error is related to a poorly written, commercial code from omniture site catalyst to track site traffic. It's removal has resolved the problem with the ajax code. There must be a collision with a variable somewhere. Well, at least that settles the problem and I know where to look. I guess I'll rename all the variables and functions and see where that takes me. Thanks for the help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.