I am making calls to twitter dynamically to get the widget on the web site. http://twitter.com/about/resources/widgets/widget_search
Instead of user getting the code from the above website, I am giving a text box to enter the same details to get the twitter search widget box.
I am able to get the tweets, but its removing the previous content and which is already on the page and updating the same page with only twitter feeds. Here is the code:
<label>Enter Search Keyword:</label>
<input type="text" id="twtKeyword"/>
<br/><br/>
<label>Enter Title:</label>
<input type="text" id="twtTitle"/>
<br/><br/>
<label>Enter Subject:</label>
<input type="text" id="twtSubject"/>
<br/><br/>
<input type="button" id="twtBtnClick" value="Click" onclick="getPageTwitter();"></input>
function getPageTwitter()
{
var searchWord=document.getElementById("twtKeyword").value;
var titleTwt=document.getElementById("twtTitle").value;
var subjectTwt=document.getElementById("twtSubject").value;
$( "#twitterWidget" ).dialog( "close" );
new TWTR.Widget({
version: 2,
type: 'search',
search: searchWord,
interval: 6000,
title: titleTwt,
subject: subjectTwt,
width: 250,
height: 300,
theme: {
shell: {
background: '#8ec1da',
color: '#ffffff'
},
tweets: {
background: '#ffffff',
color: '#444444',
links: '#1985b5'
}
},
features: {
scrollbar: false,
loop: true,
live: true,
hashtags: true,
timestamp: true,
avatars: true,
toptweets: true,
behavior: 'default'
}
}).render().start();
}
But I want the widget to stay in the same page without effecting the previous content of the page