Bookmark And Homepage Script

Discussion in 'Scripts' started by geekazoid, Jun 27, 2006.

  1. #1
    I have two image buttons, One for " Bookmark Us" and one for " Make us your Homepage"

    What two scripts do i need to make these work. Thanx peeps
     
    geekazoid, Jun 27, 2006 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    Here is the bookmark one that I use. I think the make us your homepage is a waste of space, because unless you're yahoo, msn or google, nobody is going to use it.

    Bookmark:
    
    <script>
    var urlAddress = "http://www.mysite.com";
    var pageName = "My Amazing Site";
    function addToFavorites(){
    if (window.external){
    window.external.AddFavorite(urlAddress,pageName)
    }else{ 
    alert("Sorry, but your browser doesn't support this function.\n Press 'Ctrl D' to bookmark.")</script>
    
    Code (markup):
     
    jestep, Jun 27, 2006 IP
  3. webguy75

    webguy75 Guest

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I use hotscripts.com or javafile.com for all my scripts; they're both pretty good. Hope this helps with future script needs.
     
    webguy75, Jun 27, 2006 IP
  4. geekazoid

    geekazoid Peon

    Messages:
    208
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    J. How do i add that script to an image ?
     
    geekazoid, Jun 27, 2006 IP
  5. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #5
    Sorry about that. I forgot to post the html code. You can use any type of link.

    
    <a href="javascript:addToFavorites()">Bookmark This Page</a>
    <a href="javascript:addToFavorites()"><img src="myimage.jpg" /></a>
    
    Code (markup):
     
    jestep, Jun 27, 2006 IP
  6. geekazoid

    geekazoid Peon

    Messages:
    208
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanx Alot thats brilliant, And i took your advice a homepage button probably would be unused. :D
     
    geekazoid, Jun 27, 2006 IP