PDA

View Full Version : Bookmarking the Web Page by clicking


dthomsen8
05-01-2006, 05:59 PM
I know I have seen lines on a web page that invite me to click and create a bookmark for the page, even to make it my home page.

How is it done? I cannot find the HTML from doing Google searches, so I am asking in here.

edbr
05-02-2006, 12:58 AM
Its done with javascript. here is the one I use, it contains the source address and you will posssibly find the home page script


Head





<!-- Begin
function addbookmark()
{
bookmarkurl="http://wwwJavascriptsource.com"
bookmarktitle="Welcome To The Java Script Source"
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarkti tle)
}
// End -->
</script>

body
Bookmark This Page (javascript:addbookmark())

edbr
05-22-2006, 08:31 AM
Just worked this out using a script generator and I think it is what you were looking for.

<head>

<script language="JavaScript">
<!--
var bookmarkurl="http://mysite.com";var bookmarktitle="mysite";

function addToFavorites() { if (window.external) { window.external.AddFavorite(bookmarkurl,bookmarkti tle)
} else { alert("Sorry! Your browser doesn't support this function.");
} } // --></script>
</head>


<body>


<font color="#0000FF" face="Arial">Bookmark Page !</font> (javascript:addToFavorites()) </p>


<a class="chlnk" style="text-decoration:underline;cursor:hand;color:#0000FF;" HREF onClick="this.style.behavior='url(#default#homepage)';this. setHomePage('http://mysite.com');">set your homepage to mysite.</a>
</p>
</body>

dthomsen8
05-22-2006, 12:32 PM
Just worked this out using a script generator and I think it is what you were looking for.

Thank you, I will try it later today.

jthornburgh
06-16-2006, 10:32 PM
I tried both of these and they work in IE but not Firefox. Does anbody have one that works in FF?

edbr
06-19-2006, 05:08 AM
I havent seen one that works in these browsers only that displays a message telling you to press control_d or t whatever it is. [/quote]