| | |
Tooltips for feed description
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
hello guys i am using google ajax feed api to display feed for my site and i am having problem to display the description as a tooltips.
This is the function call
I want to make it display the description as a tooltips when i mouseover the feed title/link
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
google.load("feeds", "1") function rssdisplayer(divid, url, feedlimit, showoptions){ this.showoptions=showoptions || "" var feedpointer=new google.feeds.Feed(url) feedpointer.setNumEntries(feedlimit) document.write('<div id="'+divid+'"></div>') this.feedcontainer=document.getElementById(divid) var displayer=this feedpointer.load(function(r){displayer.formatoutput(r)}) } rssdisplayer.prototype.formatdate=function(datestr){ var itemdate=new Date(datestr) return "<span style='color:gray; font-size: 90%'>"+itemdate.toLocaleString()+"</span>" } rssdisplayer.prototype.formatoutput=function(result){ if (!result.error){ var thefeeds=result.feed.entries var rssoutput="<ul>" for (var i=0; i<thefeeds.length; i++){ var itemtitle="<a href=\"" + thefeeds[i].link + "\">" + thefeeds[i].title + "</a>" var itemdate=/date/i.test(this.showoptions)? this.formatdate(thefeeds[i].publishedDate) : "" var itemdescription=/description/i.test(this.showoptions)? "<span />"+thefeeds[i].content : /snippet/i.test(this.showoptions)? "<span/>"+thefeeds[i].contentSnippet : "" rssoutput+="<li>" + itemtitle + " " + itemdate + itemdescription + "</li>" } rssoutput+="</ul>" this.feedcontainer.innerHTML=rssoutput } else alert("Error fetching feeds: "+result.error.message) }
This is the function call
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<script type="text/javascript"> //USAGE SYNTAX: new rssdisplayer("divid", "rssurl", numberofitems, "displayoptions") new rssdisplayer("cssdrive", "http://www.cssdrive.com/index.php/news/rss_2.0/", 10, "date") </script>
I want to make it display the description as a tooltips when i mouseover the feed title/link
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: How to determine which button was pressed?
- Next Thread: Selection List
| Thread Tools | Search this Thread |
ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate automatically beta box browser bug calendar captchaformproblem checkbox child class close column createrange() css cursor date debugger dependent disablefirebug dom download dropdown editor element embed engine error events explorer ext file form forms getselection google gwt gxt hiddenvalue highlightedword hint html htmlform ie7 ie8 iframe images internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsfile jump libcurl math media microsoft mimic object onmouseoutdivproblem onreadystatechange parent paypal pdf php player position post problem programming progressbar regex runtime scroll search security select shopping size software sql text textarea unicode w3c web website window windowofwords windowsxp wysiwyg \n






