twitterId.src << this what do? please see callback below...
upon browser see last line on html page I mean the LAST LINE BELOW
HTML Code:
<input type="text" list="tweets" id="tweets1" >
</input>
...
...
...
<script src="https://api.twitter.com/1/statuses/user_timeline/twitterID.json?callback=updateTweets" id="tweetsId"></script>
POPULATES THE COMBO HTML5 BOX...
This I want to change is "..twitterID.json..." in
HTML Code:
<script src="https://api.twitter.com/1/statuses/user_timeline/twitterID.json?callback=updateTweets" id="tweetsId"></script>
with real twitterID, well?
Code:
function updateTweets(tweets) {
//var tweetsSelection = document.getElementById("tweets");
var tweetsSelection = document.createElement("datalist");
tweetsSelection.setAttribute("id", "tweets");
// add all tweets to the tweets menu
for (var i = 0; i < tweets.length; i++) {
tweet = tweets[i];
// create option
var option = document.createElement("option");
option.text = tweet.text;
// strip any quotes out of the tweet so they don't mess up our option
option.value = tweet.text.replace("\"", "'");
// add option to select
tweetsSelection.appendChild(option);
}
document.getElementById("tweets1").appendChild(tweetsSelection);
}
Bookmarks