Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: set to homepage

  1. #1
    Join Date
    Sep 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default set to homepage

    is there anyway to do the following?

    1 - load the "set homepage to:______" script automatically
    2 - remember what the user selected and next time NOT load the script

    http://www.dynamicdrive.com/dynamicindex9/addhome.htm

    eg:. John Doe comes to the site, is immediately prompted to set the homepage, and selects either "YES" or "NO". John Doe will never get prompted again.

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

    Default

    Try:
    Code:
    <!--[if gte IE 5]>
    <p id="fish"></p>
    <script type="text/javascript">
      if(document.cookie.indexOf("askedHomePage=true;") == -1) {
        if(window.confirm("Set your homepage to " + window.location.href + "?")) {
          var f = document.getElementById("fish");
          f.style.behavior = "url(#default#homepage)";
          f.setHomePage(window.location.href);
        }
        document.cookie += "askedHomePage=true;";
      }
    </script>
    <![endif]-->
    Quite unreliable, but so's the whole setHomePage() thing, so I guess it doesn't matter.
    Last edited by Twey; 02-14-2006 at 12:45 PM.
    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!

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I think you would want:

    <!--[if gte IE 5]>

    for IE5 and later, your conditional comment will select IE5 only. Not vouching for or against the rest of the code.

    Just my 2 cents:

    I think the whole Homepage idea is obnoxious. Conditional comments are neat though.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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

    Default

    Guess who missed the "+" on the script ratings.
    I'm obviously not awake yet. Give me time
    Quote Originally Posted by John
    I think the whole Homepage idea is obnoxious.
    Hey, it's only IE, so I don't mind If Microsoft put things like this into their browser, they deserve to have people migrate away from it; if people don't migrate away from it, they deserve to have delightful little jewels like this in their browser.
    Conditional comments are neat though.
    But not as neat as Microsoft actually making IE standards-compliant, so we don't have to use completely different code for it in the first place.
    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!

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I've got an idea. Let's start a long winded, at times heated, discussion of the relative merits of the various browsers and their idiosyncrasies, in the hopes that the OP will abandon any thoughts of using this Homepage script.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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

    Default

    Look at that Opera... what an IE clone
    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!

  7. #7
    Join Date
    Sep 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yeah yeah... I know how much everyone hates IE and loves firefox and mozilla and the rest. For my purposes however, IE does just fine, and since most of my viewers use IE, then so much the better:-)

    The script doesn't seem to work as is. Is there any tweeking that I need to do - any instructions - install to the body or the head?

    BTW... here is the site http://thebyrdfamily.home.comcast.net
    Last edited by smoketer; 02-15-2006 at 12:40 AM.

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

    Default

    Yeah yeah... I know how much everyone hates IE and loves firefox and mozilla and the rest.
    Not really; just the "hates IE" part Anyway, that was just a spinoff of our main point: that this capability really shouldn't exist in any browser, and certainly shouldn't be used.

    Unfortunately, I currently lack qemu to test it (just installed Gentoo ), so you'll have to wait for John to get back to this thread, I fear.

    /EDIT: Ooh, 2000th post. And I spent it telling the OP to wait for John. Ah well
    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!

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Nevertheless, congratulations are in order, Mad Professor II. At least now you will also have the dubious distinction of having folks who don't quite understand what you are trying to do to help them, the option of thinking you quite insane.

    Thanks for all your help in these forums, Twey!

    Now for my prepared response . . . (re: the browsers rants)

    On second thought, I might say something I'll later regret because the truth is anyone that can code a browser, well my hat's off to 'em. Without them I'd be out of business. But, why waste a perfectly good chance to rant? You go on ahead, I may catch up later.

    To smoketer,

    I will have a look at your page and get back to you. Please forgive Twey and I his much deserved moment in the sun.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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

    Default

    Quote Originally Posted by John
    At least now you will also have the dubious distinction of having folks who don't quite understand what you are trying to do to help them, the option of thinking you quite insane.
    I think a fair few of them already thought that
    Thanks for all your help in these forums, Twey!
    They say you know you're a geek when you get paid to do what you'd do for pizza - and I've never had a single web-design job in my life.
    On second thought, I might say something I'll later regret because the truth is anyone that can code a browser, well my hat's off to 'em.
    Anyone can code a browser with sufficient (monetary) motivation. It's the ones who do it for free I admire
    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
  •