Javascript code needed for "Add to Favorites" icon in Webhelp using RH8
Hi,
I have a huge problem in making the add to favorites icon click event associate with the appropriate code.
This was the code i used in the Inline Javascript tab:
<script type="text/javascript" language="JavaScript" src="showhide.js"></script>
<input type="image" value="Add to Favorites" onclick="window.external.AddFavorite(location.href, document.title);return false"
/="" name="AddTopicToFavorites_selected.gif" src="AddTopicToFavorites_selected.gif"
<script type="text/javascript">var BookmarkURL="http://www.geekpedia.com"
var BookmarkTitle="Geekpedia"
// If the browser is Internet Explorer
if (document.all)
{
// Add to Favorites (Internet Explorer)
window.external.AddFavorite(BookmarkURL,BookmarkTitle)
}
else
{
// Add to Bookmarks (Mozilla Firefox)
window.sidebar.addPanel(BookmarkTitle, BookmarkURL, '');
}</script>
Also in the onclick in the Edit tab, i wrote: window.external.AddFavorite(BookmarkURL,BookmarkTitle)
It loads the add to favorites window very well as in any IE..But since the static word Geekpedia is being used, it displays the same and also navigates to the static URL http://www.geekpedia.com".
I want to make it work dynamically...Please help me with any code change if any one has tried this before.
One other thing that got messed up with was this icon replaced all other icons in the output....but...if i viewed the whskin_tbars.htm, i could see that the default icons appeared below somwhere...and there was this Add to Favorites icon appearing at the top...I dont know why these icons have got misplaced,,,i want to align them all in the same line..
Please help me with this.....
-Nanditha
