Welcome visitor
* Login
* Register
It is currently July 18th, 2019, 5:22 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  Link to add to favorites
PostPosted: December 3rd, 2009, 7:39 am 

Posts: 21
Hi, What is the script for links that open the window to add to favorites the current site? This site has that when you click the star image on the home page.


Top
 Profile  
 
  Re: Link to add to favorites
PostPosted: December 3rd, 2009, 8:16 am 

Posts: 61
Well, this is the code they have here, I just changed it to use a button instead of an image.
<script type="text/javascript">
function addBookmark(url,title) {
   if (window.sidebar) { // Mozilla Firefox Bookmark
      window.sidebar.addPanel(title, url,"");
   } else if( window.external ) { // IE Favorite
      window.external.AddFavorite( url, title); }
   else if(window.opera && window.print) { // Opera Hotlist
      return true; }
}
</script>
<input type="button" value="favorite!" onclick="addBookmark('http://www.scriptingok.com/','Scripting Ok!...');" />

Since the favorites belongs to the browser, each browser has a different method to add their favorites.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron