SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict jasongr's Avatar
    Join Date
    Jul 2004
    Location
    usa
    Posts
    371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to set the current page as the home page in Firefox

    Hello

    I have a button in my site which when clicked, will set the current page to be the home page for the user.
    I use the following code:
    Code:
    var hiddenLink = document.getElementById('dummyLink');
    hiddenLink.style.behavior='url(#default#homepage)'; 
    hiddenLink.setHomePage('http://www.123.com');
    somewhere in my <body>, I have the following link definition:
    Code:
    <a href="#" id="'dummyLink'" style="display:none"></a>
    Now, this solution works fine for IE
    But I need to have a working solution for Firefox and Opera too.
    Does anyone know how to solve this in these 2 browers?
    If so, I would appreciate a solution

    regards

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Only IE allows scripts to do that kind of thing.

    Extra-forum cross-post
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    SitePoint Addict jasongr's Avatar
    Join Date
    Jul 2004
    Location
    usa
    Posts
    371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Kravvitz, I will only support this feature for IE browsers then


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
  •