Jump to content

[SOLVED] ajax related javascript error


michaellunsford

Recommended Posts

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?

Link to comment
Share on other sites

  • 4 weeks later...

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

 

Link to comment
Share on other sites

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,

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.