[thelist] add to favourites and bookmark this page

Smith D.B. D.B.Smith at soton.ac.uk
Fri Oct 15 05:46:02 CDT 2004


Lisa, 

The logic of your JS should go something like this:

If the navigator.userAgent property contains the string 'MSIE' and not
'Opera' then document.write your IE specific hyperlink
else document.write the text 'Remember to bookmark us' (or something
similar)

Also <noscript> the 'Remember to bookmark us' text again for non-JS
browsers.  

Of course, this won't work if Opera or Mozilla are identifying
themselves as IE.  

Have a look at http://www.quirksmode.org/ for some JS browser detection
scripts or http://www.iota-six.co.uk/javascript/12_navig.htm for more
about the navigator object.  

HTH,
Dan

> -----Original Message-----
> From: Bird [mailto:bird at koolfish.com] 
> Sent: 15 October 2004 11:47
> To: the list
> Subject: [thelist] add to favourites and bookmark this page
> 
> 
> I need to have a text link that adds the page to peoples 
> favourites folder. That bit i can do with this code:
> 
> <a href="javascript:addbookmark()">Add to favourites</a>
> 
> I know that this is IE specific but don't want people using 
> Netscape and Opera to think that the link does not work.
> 
> What code can i add to remind people using Netscape to use 
> the add bookmark feature in their browser?
> 
> Thanks
> 
> Lisa
> 
> -- 
> 
> * * Please support the community that supports you.  * * 
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 


More information about the thelist mailing list