Log in

View Full Version : Resolved How to display multiple Twitter messages.



racksfull
05-07-2009, 07:42 PM
I need help trying to display twitter messages on my page.
I want to be able to change the twitter username with a dropdown list.

Here is what I have so far.
I Can only get one twitter username to work at this time.
I would like for the person vewing the page to change the twitter user name.




<form name="pro">
<select name="players">
<option value="phil_hellmuth"/>Phil Hellmuth
<option value="RealAnnieDuke"/>Anne Duke
<option value="TexDolly"/>Doyle Brunson
<option value="TheMouthMatusow"/>Mike Matusow
</select>
</form>

<ul id="twitter_update_list"></ul>
<script src="http://twitter.com/javascripts/blogger.js" type="text/javascript"></script>
<script src="http://twitter.com/statuses/user_timeline/phil_hellmuth.json?callback=twitterCallback2&count=3" type="text/javascript"></script>

I attempted to replace.

<script src="http://twitter.com/statuses/user_timeline/phil_hellmuth.json?callback=twitterCallback2&count=3"

with

<script src="http://twitter.com/statuses/user_timeline/+'pro.players.value'+.json?callback=twitterCallback2&count=3"

but still did not work. Please Help.
Here is the page http://www.racksfull.blogspot.com
The twitter messages are at the bottom under pro tweets.
Hopefully someone can show me how to pass the form value to the link inside the script tag.
Thanks,

racksfull
05-11-2009, 03:42 AM
After finding another thread on here I modified my code.
What I needed was.

document.getElementsByTagName("head")[0].appendChild()

It is functional with a TryIt Editor.
I still need to get it working on my homepage.



<form onchange="fctn()" name="pzz" METHOD="GET">
<select name="plyrs">
<option value="http://twitter.com/statuses/user_timeline/phil_hellmuth.json?callback=twitterCallback2&count=3"/>Phil Hellmuth
<option value="http://twitter.com/statuses/user_timeline/RealAnnieDuke.json?callback=twitterCallback2&count=3"/>Annie Duke
<option value="http://twitter.com/statuses/user_timeline/TexDolly.json?callback=twitterCallback2&count=3"/>Doyle Brunson
<option value="http://twitter.com/statuses/user_timeline/TheMouthMatusow.json?callback=twitterCallback2&count=3"/>Mike Matusow
</select>
</form>

<ul id="twitter_update_list"></ul>
<script src="http://twitter.com/javascripts/blogger.js" type="text/javascript"></script>
<script src="http://twitter.com/statuses/user_timeline/phil_hellmuth.json?callback=twitterCallback2&count=3" type type = "text/javascript"></script>
<script>
function fctn()
{
var twts = document.createElement("script");
twts.type = "text/javascript";
twts.src = (pzz.plyrs.value);
document.getElementsByTagName("head")[0].appendChild(twts);
}
</script>

racksfull
05-15-2009, 05:23 AM
Finally got it working.
I had to load it in an IFRAME from a dedicated page
to make it work on my blogspot page.