Results 1 to 3 of 3

Thread: Problem with onClick= Set As Home Page

  1. #1
    Join Date
    Jan 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Problem with onClick= Set As Home Page

    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>

  2. #2
    Join Date
    Jan 2007
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    This is the correct syntax but will only work in IE.

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    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.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •