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 :: http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js :: 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: http://kotyy.com/kotyy/index.xhtml http://kotyy.com/kotyy/tweet/jquery.tweet.js http://kotyy.com/kotyy/tweet/jquery.tweet.css http://kotyy.com/kotyy/style.css

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: http://kotyy.com/kotyy/tweet/index.html 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
1
point
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 over 6 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 over 6 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 over 6 years ago