| You are here: Home > Scripts > Javascript Add To Favorites |
| ||||||||||||||||||
|
Back to ScriptsTutorial, How to "Add to Favorites" in HTMLCreating a simple 'add to favorites' link. This is essentially a client side request, that asks the browser to 'add to favorites'. Each browser may respond differently to this request, IE will pop open a window asking the user if they wish to add to their favorites. There are 4 parts to the script:
To dynamically generate the page that you are wish to add to favorites we can use a bit of PHP. This way we can cut and paste the script and apply it to any page without having to rewrite the script. ..window.external.addfavorite('<?php echo $_SERVER['DOCUMENT_ROOT'];?>').. The output: references: MSDN: AddFavorite Method |
|
contact us: elouai@gmail.com ©2003-2008 eLouai.com, All rights reserved |