Netscape

Discussion in 'HTML' started by Desotuatail, Jan 5, 2004.

  1. Desotuatail

    Desotuatail Guest

    Please can anyone tell me how I can tell which browser is used.
    Netscape or IE (Versions might be helpfull)

    TIA

    Paul.
     
    Desotuatail, Jan 5, 2004
    #1
    1. Advertising

  2. Desotuatail

    Whitecrest Guest

    In article <>,
    says...
    > Please can anyone tell me how I can tell which browser is used.
    > Netscape or IE (Versions might be helpfull)


    You can get that information either from javascript or server side
    scripting. Search google and you will be rewarded with ton's of example
    code for either method.

    Neither method is 100% accurate, but they are both close, and will give
    you a good idea.

    --
    Whitecrest Entertainment
    www.whitecrestent.com
     
    Whitecrest, Jan 5, 2004
    #2
    1. Advertising

  3. Desotuatail

    PeterMcC Guest

    Desotuatail wrote:
    > Please can anyone tell me how I can tell which browser is used.
    > Netscape or IE (Versions might be helpfull)


    You can use js "browser-sniffing" - see:
    http://www.webreference.com/tools/browser/javascript.html
    but, if you were to say why you want to do this, you'll probably get more
    useful solutions that avoid rather unreliable detection methods. For
    instance, if it's so you can serve up a different stylesheet for NN4.x,
    there is the @import hack - see:
    http://w3development.de/css/hide_css_from_browsers/import/

    --
    PeterMcC
    If you feel that any of the above is incorrect,
    inappropriate or offensive in any way,
    please ignore it and accept my apologies.
     
    PeterMcC, Jan 5, 2004
    #3
  4. Desotuatail

    Desotuatail Guest

    Thanks for your help on thi issue. One of the problems is simply the size of an
    input text box. I used (years ago width="100" have been told on this group to
    use width:20px. Netscape does not like this.
    What I thought would be a good idea, would be to have a default .asp page
    and to check the browser type. set a session variable and use this through out
    the web site. I have

    <SCRIPT LANGUAGE="JavaScript">
    <!--

    var bName = navigator.appName;
    var bVer = parseFloat(navigator.appVersion);
    if (bName == "Netscape")
    var browser = "NS"
    else
    var browser = "IE";

    // -->
    </SCRIPT>

    but can i now set session variables for IE or NS and versions then do a
    response.write to the original home page.

    Paul.

    Desmond.
     
    Desotuatail, Jan 5, 2004
    #4
  5. Desotuatail wrote:

    > if (bName == "Netscape")
    > var browser = "NS"
    > else
    > var browser = "IE";


    This script seems to assume that any non-Netscape browser is Internet
    Explorer. That is simply not true.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Jan 5, 2004
    #5
  6. Desotuatail

    picayunish Guest

    PeterMcC wrote:
    > Desotuatail wrote:
    >
    >>Please can anyone tell me how I can tell which browser is used.
    >>Netscape or IE (Versions might be helpfull)

    >
    >
    > You can use js "browser-sniffing" - see:
    > http://www.webreference.com/tools/browser/javascript.html


    Or
    http://www.quirksmode.org/js/detect.html

    This is a list of 103 records of User Agents strings.
    http://www.highermind.org/design/user_agent/?action=list

    On this site you can find User Agents strings of mobile phones and PDA's.
    http://www.mobileopera.com/reference/general
    --
    Edwin van der Vaart
    http://www.semi-conductor.nl/ Links to Semiconductors sites
    http://www.evandervaart.nl/ Under construction
     
    picayunish, Jan 5, 2004
    #6
  7. Desotuatail

    kchayka Guest

    Toby A Inkster wrote:

    > Desotuatail wrote:
    >
    >> if (bName == "Netscape")
    >> var browser = "NS"
    >> else
    >> var browser = "IE";

    >
    > This script seems to assume that any non-Netscape browser is Internet
    > Explorer. That is simply not true.


    This scrips also seems to assume that all versions of Netscape are
    created equal. That is most definitely not true, either.

    --
    To email a reply, remove (dash)un(dash). Mail sent to the un
    address is considered spam and automatically deleted.
     
    kchayka, Jan 6, 2004
    #7
  8. Desotuatail

    Desotuatail Guest

    I am not realy concerened about browsers other than Netscape or IE. What I am
    concerened is how (while checking for these 2 browsers using Javascript I can
    set a session variable so that it can be used as a flag for other pages in the
    website.

    Paul.
     
    Desotuatail, Jan 8, 2004
    #8
  9. Desotuatail

    Kris Guest

    In article <>,
    (Desotuatail) wrote:

    > I am not realy concerened about browsers other than Netscape or IE. What I am
    > concerened is how (while checking for these 2 browsers using Javascript I can
    > set a session variable so that it can be used as a flag for other pages in the
    > website.
    >
    > Paul.


    Start a new thread.

    --
    Kris
    erlands (nl)
     
    Kris, Jan 8, 2004
    #9
  10. Desotuatail

    Dave Gorman Guest

    On Thursday 8th January 1997, Desotuatail <> wrote:
    > I am not realy concerened about browsers other than Netscape or IE. What I am
    > concerened is how (while checking for these 2 browsers...


    What 2 browsers? Have you any idea of the difference between NS4 and NS7?
    Or the differences between IE5.0 and 6.0 or IE5 for Mac and Windows?

    Since most modern browsers are capable of rendering well made pages more
    or less the same (IE6, Mozilla, Opera, Safari in strict mode) why bury
    your head in the sand and pretend there are only 2 browsers, all versions
    of which behave the same?
     
    Dave Gorman, Jan 8, 2004
    #10
  11. Desotuatail

    Desotuatail Guest

    Ok I get the message
    nobody knows how to add a Session("Bowser") = "X"
    within Javascrpt

    <scipt>
    </script>

    Tags
     
    Desotuatail, Jan 8, 2004
    #11
  12. Desotuatail

    Steve Pugh Guest

    (Desotuatail) wrote:

    >Ok I get the message
    >nobody knows how to add a Session("Bowser") = "X"
    >within Javascrpt
    >
    ><scipt>
    ></script>
    >
    >Tags


    Session variables are set by server side processes not by client side
    scripts like JavaScript. The closest you can get in JavaScript is to
    set a cookie and then read that back on every page.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
     
    Steve Pugh, Jan 8, 2004
    #12
  13. Desotuatail

    Whitecrest Guest

    In article <>,
    says...
    > Session variables are set by server side processes not by client side
    > scripts like JavaScript. The closest you can get in JavaScript is to
    > set a cookie and then read that back on every page.


    Or just pass it from page to page.

    --
    Whitecrest Entertainment
    www.whitecrestent.com
     
    Whitecrest, Jan 8, 2004
    #13
    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. Stephen

    Netscape Problem

    Stephen, Aug 19, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    413
    Stephen
    Aug 19, 2004
  2. Stephen

    Netscape + enter key Problem

    Stephen, Aug 20, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    393
    Stephen
    Aug 20, 2004
  3. Tom
    Replies:
    0
    Views:
    495
  4. Mickey Segal
    Replies:
    1
    Views:
    666
    Mickey Segal
    May 21, 2004
  5. yaktipper
    Replies:
    10
    Views:
    281
    Richard Cornford
    Jul 10, 2003
Loading...

Share This Page