48 users online (1 members and 47 guests)  


  Results 1 to 2 of 2

Related

  1. Replies: 1
  2. Replies: 1
  3. adding up my values    Forum: Javascript Forum
    Replies: 1
  4. Adding Music    Forum: HTML Forum
    Replies: 6
  5. add favorites--customizable?    Forum: HTML Forum
    Replies: 6
  1. #1
    Ajax's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2002
    Posts
    15

    Question Adding Favorites

    Can someone post the html or java code for adding favorites for a website? When people go to my site i want a popup option for letting the visitor have the option to add my site to their favorites (bookmarks), thanks a mill.

  2. #2
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732
    Hi there Ajax,

    as 'Add to Favorites' is I.E. only you might like to hide it from other browsers.
    If so place this code within the head section...
    Code:
    <style type="text/css">
    <!--
    
    #fav {
         display:none;
     }
    button {
         width:210px;
     }
    
    //-->
    </style>
    
    <script type="text/javascript">
    <!--
    
    function favorites() {
      if(document.all) {
         document.getElementById("fav").style.display="block";
      }
     }
    onload=favorites;
    
    //-->
    </script>
    ...and this where you want it to appear in the body...
    Code:
    <div id="fav">
    <button  onclick = "window.external.AddFavorite(location.href,document.title);">Add This Site To Your Favorites</button>
    </div>
    With regard to a pop-up, if you put it in there...
    then it will be the pop-up that is added to favorites

    coothead



Tags for this Thread