detecting if a user is connected to the internet...

Discussion in 'Javascript' started by Frances Del Rio, Oct 13, 2004.

  1. I need to put content from web presentation on CD... interface contains
    external links (absolute urls..) is there a way to detect if user is
    connected to the internet (so if they're not I can pop an alert saying
    'sorry, you're not connected...' etc..) this is for CD's that will be
    widely distributed/sold.. so needs to be 'bulletproof'... (that it
    doesn't by error detect user is not connected if they are and
    vice-versa, etc..)
    thank you.. Frances
    Frances Del Rio, Oct 13, 2004
    #1
    1. Advertising

  2. Frances Del Rio

    kaeli Guest

    In article <>, enlightened us
    with...
    >
    > I need to put content from web presentation on CD... interface contains
    > external links (absolute urls..) is there a way to detect if user is
    > connected to the internet (so if they're not I can pop an alert saying
    > 'sorry, you're not connected...' etc..) this is for CD's that will be
    > widely distributed/sold.. so needs to be 'bulletproof'... (that it
    > doesn't by error detect user is not connected if they are and
    > vice-versa, etc..)




    Yes, but not with javascript appropriate to this group.
    It would be OS-dependent code. For windows, you could use the windows API to
    check that, but that would have to be done in C or VB (J#.net, etc). JScript
    in .net is the closest you'll be getting to javascript. ;)

    I don't know of any other *reliable* way to check other that that.

    --
    --
    ~kaeli~
    A midget fortune teller who escapes from prison is a small
    medium at large.
    http://www.ipwebdesign.net/wildAtHeart
    http://www.ipwebdesign.net/kaelisSpace
    kaeli, Oct 13, 2004
    #2
    1. Advertising

  3. Frances Del Rio

    VK Guest

    You can't, at least on the "bulletproof" level.

    IE gives you navigator.onLine property (true/false), but it shows only if
    user is in the "global offline mode" (thus, there was an autoconnect attempt
    and s/he pressed cancel on it).

    Re-think your model. How about a welcome screen (flash/video/audio limited
    by your good taste only) with options: "Connect now", "I'm already
    connected", "Stay offline".
    Set a glob var upon selection and dance from that point forward.
    VK, Oct 13, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mindy Myers
    Replies:
    4
    Views:
    282
    Richard Loupatty
    Jan 29, 2004
  2. Eitan M
    Replies:
    1
    Views:
    317
    Eitan M
    Jun 10, 2005
  3. =?Utf-8?B?cmFtYXRh?=
    Replies:
    2
    Views:
    606
    Spam Catcher
    Nov 9, 2005
  4. Guy
    Replies:
    1
    Views:
    663
    Jonck
    Sep 27, 2004
  5. Brett S Hallett

    detecting if I am connected to a ISP

    Brett S Hallett, Oct 11, 2003, in forum: Ruby
    Replies:
    7
    Views:
    101
    Rob Partington
    Oct 21, 2003
Loading...

Share This Page