SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast Line's Avatar
    Join Date
    Jul 2006
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I would like to create a hyperlink for users to set my site as their homepage

    I would like to create a hyperlink for users to set my site as their homepage

    I've seen the code to make one in Internet Explorer:
    Code:
    <!--[if IE]>
    <font face="Arial" size="3">
    <A HREF="#"
    onClick="this.style.behavior='url(#default#homepage)';
    this.setHomePage('http://www.codelifter.com');">
    Make CodeLifter Your Homepage
    </A>
    </font>
    <![endif]-->
    Is there a universal script for Internet Explorer, Firefox and others?

    Thanks ahead for your reply,
    -Line
    The LineDetail Drawing Co Theme Site Design Art Flash Game Design
    http://WebSlime.com | Low Cost Hosting And Domain Names

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,423
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Only IE let's users do this. It is their proprietary extension to JavaScript. There is no way to do it in any other browser.

  3. #3
    SitePoint Enthusiast Line's Avatar
    Join Date
    Jul 2006
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does the code also allow me to hide an image if ie is not the browser in use?

    -Line
    The LineDetail Drawing Co Theme Site Design Art Flash Game Design
    http://WebSlime.com | Low Cost Hosting And Domain Names

  4. #4
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,423
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    That code should only work in IE. No one else will see it.

  5. #5
    SitePoint Wizard bronze trophy bluedreamer's Avatar
    Join Date
    Jul 2005
    Location
    Middle England
    Posts
    3,366
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,834
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by bluedreamer
    That's a bookmark script not a homepage script - something completlely different.

    ONLY IE is stupid enough to allow web pages the necessary access to be able to change your home page. There is a registry entry that you can change to lock the home page but only browser hijackers seem to know about it (they get their web page to update your home page to some advertising or porn site and then lock it so that you can't change it back without editing the registry).

    All browsers have a menu option that allows people to choose to set their home page and so no page significant enough for people to want to make it their home page ever includes the code in their page to provide the IE link to do so as that brands their site as unprofessional and convinces people to not have it as their home page.
    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="^$">

  7. #7
    SitePoint Wizard bronze trophy bluedreamer's Avatar
    Join Date
    Jul 2005
    Location
    Middle England
    Posts
    3,366
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall
    That's a bookmark script not a homepage script - something completlely different.
    Ahh damn - that's twice I've misread a post - either i was tired or it's old age

  8. #8
    SitePoint Enthusiast Line's Avatar
    Join Date
    Jul 2006
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Haha Well, I used the script I found for the homepage script. At least ie users will get to see the link.

    The reason I posted this reply was to show my "make this site your homepage" link, if you're using ie of course. It's neat to see the image and link dissappear when you view it in Firefox.

    Here's the page I'm designing for the relaunch of my online community. Was hoping to launch tommorrow but soooo much work to be done and I have to do other stuff.

    www.NewsForNow.com

    I'll have to post this in the critiques area when it's finally ready.

    -Line
    Last edited by Line; Jul 16, 2006 at 23:01. Reason: woops, I meant to add the reason I posted this reply was to show my "make this site your homepage" link, if you're using ie of course
    The LineDetail Drawing Co Theme Site Design Art Flash Game Design
    http://WebSlime.com | Low Cost Hosting And Domain Names


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
  •