Add This in Webconfig:
<add key="Bookmark" value="http://www.yahoo.com%5ewww.google.com%5ewww.facebook.com%22/>
<add key="Title" value="Yahoo^Google^Facebook"/>
Script Add This where you want:
<script type="text/javascript">
function click_handler(sender, e) {
if (e.get_item().get_commandName() == 'Bookmark') {
var Url = '<%=ConfigurationManager.AppSettings["Bookmark"].ToString() %>'
var Title = '<%=ConfigurationManager.AppSettings["Title"].ToString() %>'
var UrlArry = Url.split('^');
var TitleArry = Title.split('^');
for (var i = 0; i < UrlArry.length; i++) {
bookmark_us(UrlArry[i], TitleArry[i]);
}
}
}
function bookmark_us(url, title) {
if (window.sidebar) // firefox
window.sidebar.addPanel(title, url, "");
else if (window.opera && window.print) { // opera
var elem = document.createElement('a');
elem.setAttribute('href', url);
elem.setAttribute('title', title);
elem.setAttribute('rel', 'sidebar');
elem.click();
}
else if (document.all)// ie
window.external.AddFavorite(url, title);
}
</script>
<add key="Bookmark" value="http://www.yahoo.com%5ewww.google.com%5ewww.facebook.com%22/>
<add key="Title" value="Yahoo^Google^Facebook"/>
Script Add This where you want:
<script type="text/javascript">
function click_handler(sender, e) {
if (e.get_item().get_commandName() == 'Bookmark') {
var Url = '<%=ConfigurationManager.AppSettings["Bookmark"].ToString() %>'
var Title = '<%=ConfigurationManager.AppSettings["Title"].ToString() %>'
var UrlArry = Url.split('^');
var TitleArry = Title.split('^');
for (var i = 0; i < UrlArry.length; i++) {
bookmark_us(UrlArry[i], TitleArry[i]);
}
}
}
function bookmark_us(url, title) {
if (window.sidebar) // firefox
window.sidebar.addPanel(title, url, "");
else if (window.opera && window.print) { // opera
var elem = document.createElement('a');
elem.setAttribute('href', url);
elem.setAttribute('title', title);
elem.setAttribute('rel', 'sidebar');
elem.click();
}
else if (document.all)// ie
window.external.AddFavorite(url, title);
}
</script>
No comments:
Post a Comment