Getting Bookmarked Techniques
Intro to this session
How do you added your website into a book mark. How do you automate this process?
Java script to book mark a page Place this in the header
<Script Language = "JavaScript" Type="Text/JavaScript">
<!-- Hide script from older browsers
var urlAddress = "http://www.philipmrussell.co.uk/wsm/index.htm";
var pageName = "Philips Unit 11 Web Site Management";
function addToFavourites()
{
if (window.external)
{
window.external.AddFavorite(urlAddress,pageName)
}
else
{
alert("Sorry! Your Browser cannot do this.");
}
}
// -->
</script>
In your body create a form and inside this place this code
Bookmark this page! <INPUT TYPE="button" VALUE="Add to Favourite" onClick="addToFavourites()">
A more compact version is below
<FORM>
<INPUT TYPE="button" VALUE="Add to Favorites" onClick='window.external.AddFavorite(location.href, document.title);'>
</FORM>
And here is a css version
<span style='cursor:hand;text-decoration:underline;'
onclick='window.external.AddFavorite(location.href,document.title);'>
Click here to add this page to your favorites</span>
Finally here is a more cross browser approach
<script> <!-- Begin
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
var url="http://www.yourdomain.com";
var title="Your Site Name";
document.write('<A HREF="javascript:window.ext');
document.write('ernal.AddFavorite(url,title);" ');
document.write('onMouseOver=" window.status=');
document.write("'Click here to add our site to your favorites!'; return true ");
document.write('"onMouseOut=" window.status=');
document.write("' '; return true ");
document.write('">Click here to add our site to your favorites!</a>');
}
else {
var msg = "Bookmark us!";
if(navigator.appName == "Netscape") msg += " (CTRL-D)";
document.write(msg);
}
// End -->
</script>
Try this out on some of your code
Other bookmark Systems
and alternative
What other bookmark systems are there?
What design considerations have to be taken into account when designing this website? Here are some ideas.
The size of the Screen
14" - 19" 24 " monitor How does the size of the screen affect a website?
What about the shape of the screen?
What about the resolution on the monitor? What is the most common size for the resolution? How can you design a webpage so that it can fit into any size screen? You could centre the webpage.
What about viewing these on PDA's and mobile phones.
How does the operating system affect the webpages?
What are the different OS's on a Mac, PC, Linux?
What about the different browsers that run on the different systems?
What is a Colour safe palette?
Homework [M1] [What design considerations have to be taken into account when designing this website? Screen size, Operating Systems, Systems etc.] Front Sheet