PDA

View Full Version : How to make a "Make this your homepage" button



jsnodgra
08-17-2007, 01:37 PM
I want to add a "make this your homepage" button on my site. I can find the html code but am unable to make a button do the job. I may be being a bit thick but how do I use the code

<FORM>
<INPUT TYPE="button" VALUE="Make This Site Your HomePage" onClick="this.style.behavior='url(#default#homepage)'; this.setHomePage('http://www.npda.co.uk');">
</FORM>

in a button. Naval design showed how to do it for a "bookmark this site" button in another thread which I made work no probs.

Any help much appreciated

Cheers
John

www.npda.co.uk (http://www.npda.co.uk)

navaldesign
08-17-2007, 07:35 PM
If you use the script as it is, you don't need a button, the script creates it. Just drag a html box in your page, and paste the code in the box. Please note that you have a small mistake, there is a whitespace: homepag e

However, this will produce a standard button.

You can also do it with a BV Advanced Button (you can find it in the Forms Toolbar). Place the button in your page, make it Onclick, OnClick Action: Execute Javascript Function, and in the Onclick Value field paste this:
this.style.behavior='url(#default#homepag e)'; this.setHomePage('http://www.npda.co.uk');

The advantage of using a BV Advanced Button is that you can style both the text and the button as you like, you can even use an image for the button

jsnodgra
09-04-2007, 10:05 PM
Brilliant, thanks for the response its been bugging me.