So, here I am trying to design a personal website for myself and I get this wonderful idea that it would be neat to have my twitter feed on the page. There is a great little jQuery plugin called "Tweet" which is just perfect for my needs. I install it and follow the instructions to the letter, but it doesn't work. I fire up the Safari Web Inspector and I get this beauty:

NOMODIFICATIONALLOWED_ERR: DOM Exception 7: An attempt was made to modify an object where modifications are not allowed.

Firebug hands me this guy:

uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NSERRORINVALIDPOINTER) [nsIDOMNSHTMLElement.innerHTML]" nsresult: "0x80004003 (NSERRORINVALIDPOINTER)" location: "JS frame :: :: anonymous :: line 12" data: no]

From my google-fu, I've seen suggestions that I change my doctype to the html 5 doctype, change the meta http-equiv from "content-type" to "content-script-type", change my meta content from "application/xhtml" to "text/html" even though it's been that all along, or even to use remove the period from the jquery.min script src, but, alas, nothing has worked for me.

Here are the related pages:

I'm running out of things to try... Do any of you know what is going on?

P.S.: I also have sIFR installed, but I don't believe that's related to the problem at all, as I've even tried commenting everything out except the necessary tweet elements and it still doesn't work. P.P.S.: The demo that came with the installation package, works fine: P.P.P.S.: Also, I once gave up on installing tweet and tried juitter... only to get the exact same problem.

1 answer

Doug 1095
This was chosen as the best answer

You were serving your page as XML instead of HTML. Try changing the name of the file to index.html instead of index.xhtml.

Answered about 7 years ago by Doug
  • Thanks to an awesome user on reddit, I found this out about two minutes ago. Would you mind explaining why it matters if I choose html or xhtml? Or pointing me in the right direction to learn it myself? Thanks. kotyy about 7 years ago
  • XHTML (when actually served as XML) strictly requires XML syntax, meaning all elements must be closed. The twitter script you are using tries to create an element like so: <ul class="tweet_list"> Notice the element is not closed. In HTML, which is all loosy-goosy with syntax, this is okay; the browser just quietly closes it. In XHTML, the browser throws an error. The script works fine if you change the call to create an element like so: <ul class="tweet_list" /> Doug about 7 years ago