DIGIT-ARC read-only archive · snapshot: July 23, 2026

Add Bookmark button

5 posts · originally from https://geek.digit.in/community/threads/add-bookmark-button.141013/

mohityadavx
mohityadavx Original post #1
May 19, 2011 at 9:00 PM
Hi!

I am making a website on Google sites and i want to add a button which when clicked will bookmark page in browser used.

My problem is I don't know HTML/CSS/PHP/ASP etc thats why it is being made on Google sites. ( Also

Can anyone tell me what should I do to add button.

Plz don't suggest me to learn language as its not a Tech based site with all those fancy looks and feature its a plain site on student resources so I need not meddle my head in languages right now.
nims11
nims11 #2
May 19, 2011 at 9:32 PM
add this code-
Code:
<input type="button" value="bookmark it!!" onClick="javascript:if(document.all)window.external.AddFavorite(location.href,document.title);else%20if(window.sidebar)window.sidebar.addPanel(document.title,location.href,'');" />
for explanation, the statement inside the if() checks for the browser. the first if statement checks for internet explorer and the second one for the others.
mohityadavx
May 19, 2011 at 9:35 PM
add this code-
Code:
<input type="button" value="bookmark it!!" onClick="javascript:if(document.all)window.external.AddFavorite(location.href,document.title);else%20if(window.sidebar)window.sidebar.addPanel(document.title,location.href,'');" />
for explanation, the statement inside the if() checks for the browser. the first if statement checks for internet explorer and the second one for the others.

Thanx Nims 4 explaining its much like english only!!! ( I also know bits of C++ @ CBSE level)

But Google sites doesn't support javascript

it only supports HTML and partly JAVA

PS:- Can't the code be generalized for all browser as I want it to work at all platform
nims11
nims11 #4
May 19, 2011 at 9:53 PM
google sites won't be supporting javascript anytime soon. there are ways to insert javascripts using gadgets. google it.
the code will work with all the common browsers.