Jump to content
Sign in to follow this  
mkessler

IE Error Using @anywhere Tweet Box

Recommended Posts

IE won't load the @anywhere Tweet Box on my site. (Works fine in FF, Opera, & Safari). I've had IE error's with script before that have turned out to be simple fixes and was hoping this was the same. If anyone knows any advice on how to solve the problem I would greatly appreciate it! Here's the error message and code:IE Error Msg: Webpage error detailsMessage: Object doesn't support this property or methodLine: 1Char: 1Code: 0URI: http://search.twitter.com/search.json?call...obs&rpp=100Script:

<head><script src="http://platform.twitter.com/anywhere.js?id=*******&v=1" type="text/javascript"></script></head><body><script type="text/javascript">            twttr.anywhere(function (T) {            T("#tbox").tweetBox({            height: 50,            width: 340,            label: "<span style=\"color: #fff; font-size: .9em; font-family: arial, sans-serif;\">What's Happening?</span>",            defaultContent: "'Post tweet here"            });           });</script></div></body>

Share this post


Link to post
Share on other sites

Try

$(window).load(function() {$("#tbox").tweetBox({  height: 50,  width: 340,  label: "<span style=\"color: #fff; font-size: .9em; font-family: arial, sans-serif;\">What's Happening?</span>",  defaultContent: "Post tweet here"});});

Share this post


Link to post
Share on other sites

Still having the same problem and was wondering if anyone could help... Here's the code and error message:Error Message:

Object doesn't support this property or methodLine: 55Char: 13Code: 0URI:

Line 55 is in Bold

<script type="text/javascript">             [b] twttr.anywhere(function (T) {[/b]             T("#tbox").tweetBox({            height: 65,            width: 360,            label: "<span style=\"color: #aaa; font-size: .9em; font-family: arial, sans-serif;\">What's Up?</span>",            defaultContent: "'Post tweet here"            });           }); </script>

Edited by mkplayer

Share this post


Link to post
Share on other sites

I think he's wondering where twttr is being defined. You're calling a method (anywhere) on twttr, yet where has twttr been defined such that the statement would understand twttr.anywhere(function (T). twttr should be initialized to something, most likely coming from that script file returning something.

Share this post


Link to post
Share on other sites

Right... I guess no where then? I tried following this tutorial from Twitter (http://dev.twitter.com/anywhere/begin#tweetbox), but something must be off because theirs works in IE and mine doesn't (works in FF, Safari, and Opera). Any ideas on where to start would be greatly appreciated!

Share this post


Link to post
Share on other sites

hmmm, i guess that does create the global twttr object just like that. I'm not sure now, although I plan on using this stuff in the next week or so for my friends site. Figures there's a browser that's got to be a stick in the mud... :)

Share this post


Link to post
Share on other sites

Move the script tag that includes the file from twitter directly above the script block in the body, so that both of them are in the body.

Share this post


Link to post
Share on other sites

You're a genius, justsomeguy! Thanks for the help! @thescientist - Now works in all major browsers :-)

Share this post


Link to post
Share on other sites

sweet, at least twitter should be an easy thing to implement for my friends site.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×