View Full Version : Problem with onClick= Set As Home Page

01-16-2007, 10:48 AM
I am looking to create an onClick=Set as Home Page link on my site which redirects when 'YES' is clicked & stays on current page if clicked 'NO'.

e.g - If a browser on my site clicks 'Set as Home Page' I am redirecting them to a thank you page. Similar to Google sending you to http://www.google.com/mgyhp.html. Unfortunatley my script sends them to the Thank You page even if they say 'NO' to set as home page.

Can anyone help? Thank you for your time.

The code I am using is below.

<a href="thank-you.html" class="style53" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.mydomain.com/index.html');">Set as Home Page!</a>

01-18-2007, 05:29 AM
This is the correct syntax but will only work in IE.

01-18-2007, 09:22 AM
I'm afraid I don't think it's possible to do this. setHomePage() doesn't return a value according to MSDN, so it's not really possible to tell whether the user accepted or not.