Results 1 to 3 of 3

Thread: How to display multiple Twitter messages.

  1. #1
    Join Date
    May 2009
    Location
    Michigan
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to display multiple Twitter messages.

    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.


    Code:
    <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,
    Last edited by Snookerman; 05-15-2009 at 05:47 AM. Reason: added “Resolved” prefix

  2. #2
    Join Date
    May 2009
    Location
    Michigan
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default New Code

    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.

    Code:
    <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>

  3. #3
    Join Date
    May 2009
    Location
    Michigan
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Finally got it working.
    I had to load it in an IFRAME from a dedicated page
    to make it work on my blogspot page.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •