Add Bookmark button

mohityadavx

Youngling
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

BIOS Terminator
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.
 
OP
mohityadavx

mohityadavx

Youngling
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

BIOS Terminator
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.
 
Top Bottom