SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    May 2005
    Posts
    209
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb this.setHomePage not working in mozilla

    I have a link in my website(abc.com) called "Make Us your home page". Once a user clicks it the link of my website(abc.com) becomes the home page for the browser.
    This works absolutely fine in IE, but does not work in mozilla. I get the following error in the console:

    Error: this.setHomePage is not a function

    The code i have used is as follows:

    <a href="#" onClick="this.style.behavior='url(#default#homepage)'; this.setHomePage('http://www.abc.com');">Make us your homepage</a>

    I suppose that sethomepage function is not supported by mozilla, if that is so, then how do i achieve my objective in mozilla? Can any one pls help me?

  2. #2
    SitePoint Addict
    Join Date
    Jan 2006
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    setHomePage is only recognized by IE (if I recall correctly)

  3. #3
    SitePoint Addict
    Join Date
    May 2005
    Posts
    209
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so how do i achieve my objective in mozilla?

  4. #4
    SitePoint Addict
    Join Date
    Jan 2006
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have yet to see a "Set this site as your homepage" link that works in Mozilla. I would give instructions to non IE users about how to set it as their homepage.

  5. #5
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank god this doesn't work in Mozilla. I wouldn't like to end up with a new homepage only because a website thought I should have it.

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,875
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Only IE has this security hole. See http://www.felgall.com/brsie26.htm for info on how to plug this hole so that web pages can't hijack your IE homepage.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


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
  •