Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Reacting to the users OS

Reacting to the users OS

Scheduled Pinned Locked Moved Web Development
htmlhelpquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dev578
    wrote on last edited by
    #1

    I am using geocities to host my website, they offer an HTML editor. What I am trying to do is find out what OS the user is running, and load the page accordingly. In code it would look something like this: if the user is running Windows XP { Set the web page text to "You are running XP"; { else { Set the web page text to "Your are not running Windows XP"; } how would I go about doing this? Any help is appreciated:) -Dev578

    J A 3 Replies Last reply
    0
    • D Dev578

      I am using geocities to host my website, they offer an HTML editor. What I am trying to do is find out what OS the user is running, and load the page accordingly. In code it would look something like this: if the user is running Windows XP { Set the web page text to "You are running XP"; { else { Set the web page text to "Your are not running Windows XP"; } how would I go about doing this? Any help is appreciated:) -Dev578

      J Offline
      J Offline
      John Kuhn
      wrote on last edited by
      #2

      To the best of my knowledge, no. The best you can do is determine that they are running "Win32", which is exposed in JavaScript as navigator.platform:

      <!-- details omitted... -->

      function window_onload() {
      window.alert(navigator.platform)
      }

      <!-- details omitted... -->

      <body onload="return window_onload()">

      What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

      1 Reply Last reply
      0
      • D Dev578

        I am using geocities to host my website, they offer an HTML editor. What I am trying to do is find out what OS the user is running, and load the page accordingly. In code it would look something like this: if the user is running Windows XP { Set the web page text to "You are running XP"; { else { Set the web page text to "Your are not running Windows XP"; } how would I go about doing this? Any help is appreciated:) -Dev578

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        U can use Server object in ASp. It will provide u full information about what O.S. is running,Ur System Configuration and other system information. So try to find out the solution by using Server Object.

        1 Reply Last reply
        0
        • D Dev578

          I am using geocities to host my website, they offer an HTML editor. What I am trying to do is find out what OS the user is running, and load the page accordingly. In code it would look something like this: if the user is running Windows XP { Set the web page text to "You are running XP"; { else { Set the web page text to "Your are not running Windows XP"; } how would I go about doing this? Any help is appreciated:) -Dev578

          J Offline
          J Offline
          John Kuhn
          wrote on last edited by
          #4

          The previous, anonymous post would be correct, assuming you have the ability to write server-side code in something (PHP,ASP,ASP.NET,etc); however, given your example, I assumed that you don't have that capability, and are limited to JavaScript. It might be feasible to do something with a Java Applet, but of course, that only works for users of your site with Java Runtime Environment installed. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups