I was able to fix it.
Now the "undefined" tag is removed when we turn off the RSS feed.
Below is the function for 'topic RSS'. Since the else part was missing, it was returning nothing/null and that had been treated as 'undefined'.I have added the same and now it is working fine.
function _doTopicRSSLink(id)
{
if (onimod_rss=="YES")
{
return '<A HREF="/'+onimod_webdbname+'/rssfeed.xml?OpenPage&MainId='+id+'" alt="'+text_rsstopic+'" title="'+text_rsstopic+'"><img src="rss.gif" border=0></a>';<br/>
}
else
{
return "" <br/>
}
}