Page 1 of 1
Add to favorites - Send Page Functions
Posted: Fri 28. May 2004, 21:13
by eglwolf
If there is not one already it would be nice to have an add to favorites function built in And also a send page function.
like there is for "back", "top", "Print"
If this is built in already can someone point me to it?
Add to Favorites Update
Posted: Sat 29. May 2004, 00:24
by eglwolf
Ok I searched and played around enought that I found a snippet of code that works.
Code: Select all
<script>
<!--
if (document.all && document.getElementById){
document.write("<a href=\"#\" onclick=\"window.external.AddFavorite('" +document.URL+ "', '" +document.title+ "');return false;\">bookmark</a>")
}
else
{
document.write("Bookmark This Page")
}
// -->
</script>
The only last thing I would like to do is get the icon to also be hyperlinked to the script. So that they can click the icon or the text and add to favorites.
Code: Select all
<img src="img/article/icn_bookmark.gif" border="0">
Any coders out there know how to do this?
Send This Page
Posted: Sat 29. May 2004, 05:17
by eglwolf
Well I have the "Send this Page" thing worked out.
In your template HTML head you can enter:
Code: Select all
<script language="javascript">
function mailpage()
{
mail_str = "mailto:?subject=Check out the " + document.title;
mail_str += "&body=I thought you might be interested in the " + document.title;
mail_str += ". You can view it at, " + location.href;
location.href = mail_str;
}
</script>
(I personally like to make a .js file for these and then call it from the html head of the template:
Code: Select all
<script type="text/javascript" language="JavaScript1.2" src="images/email.js"></script>
And save this code as the email.js and upload it to your desired location:
Code: Select all
function mailpage()
{
mail_str = "mailto:?subject=Check this out - " + document.title;
mail_str += "&body=I thought you might be interested in the " + document.title;
mail_str += ". You can view it at, " + location.href;
location.href = mail_str;
}
Then for the link use:
I finally found this on this site:
http://www.hooverwebdesign.com/emailpage.html
Posted: Sat 29. May 2004, 09:15
by frold
Posted: Sat 29. May 2004, 10:00
by Jérôme
I would also recommend the hack - the other method is too dependend on browser/email client. If the email client is not correctly configured and included in the browser, this method will not work.
Posted: Sat 29. May 2004, 14:34
by eglwolf
Thanks I will take a look at this.
Does anyone know of a better cross browser "Bookmark", "Add to Favorites". The one I am using now only works with IE, and I would like something to work with IE, Netscape, Mozilla, FireFox and Opera.