views:

37

answers:

1

Hi guys

I have Googled for a JavaScript that sets the current page to your startpage. But all I can find is some old script for IE 5 and up.

<FORM>
<INPUT TYPE="button" VALUE="Make This Site Your Home Page" onClick="this.style.behavior='url(#default#homepage)'; this.setHomePage('Page URL beginning with http:// here');">
</FORM>

They only seem to work in IE and they also seem to be inline.

Id like one in my script file and one that works in all browsers.

Any suggestions anyone?

Thanks

A: 

Id like one in my script file

That shouldn't be a problem. Add

document.getElementById("link_id").style.behavior = .......

to your script file (also giving the link an ID).

and one that works in all browsers.

That is not possible. (Thankfully, in my opinion.) I think there was a workaround for Firefox, but none for the other browsers.

Pekka
Thats what I thought.Thanks for that.Time to tell my client it's not gonna happen ;-)
meow