I want to create a javascript for automatic social bookmarking. I have a url,content,target website,login id and password for that target site. I want to login to that site and want to paste the content and url into the site. How I can do this with javascript.
Please help.
function bookmark()
{
var title = 'Google';
var url = 'http://google.com';
if (document.all)// Check if the browser is Internet Explorer
window.external.AddFavorite(url, title);
else if (window.sidebar) //If the given browser is Mozilla Firefox
window.sidebar.addPanel(title, url, "");
else if (window.opera && window.print) //If the given browser is Opera
{
var bookmark_element = document.createElement('a');
bookmark_element.setAttribute('href', url);
bookmark_element.setAttribute('title', title);
bookmark_element.setAttribute('rel', 'sidebar');
bookmark_element.click();
}
}
harinarayana...
Member
63 Points
130 Posts
Javascript for automatic bookmarking
Apr 15, 2012 11:52 AM|LINK
Hi,
I want to create a javascript for automatic social bookmarking. I have a url,content,target website,login id and password for that target site. I want to login to that site and want to paste the content and url into the site. How I can do this with javascript. Please help.
atulthummar
Participant
1612 Points
389 Posts
Re: Javascript for automatic bookmarking
Apr 16, 2012 09:25 AM|LINK
Hi,
function bookmark() { var title = 'Google'; var url = 'http://google.com'; if (document.all)// Check if the browser is Internet Explorer window.external.AddFavorite(url, title); else if (window.sidebar) //If the given browser is Mozilla Firefox window.sidebar.addPanel(title, url, ""); else if (window.opera && window.print) //If the given browser is Opera { var bookmark_element = document.createElement('a'); bookmark_element.setAttribute('href', url); bookmark_element.setAttribute('title', title); bookmark_element.setAttribute('rel', 'sidebar'); bookmark_element.click(); } }more detail pls refer: http://labnol.blogspot.in/2006/01/add-to-favorites-ie-bookmark-firefox.html
Atul T.
Please click "mark as answer" if this post helped you.