Windows Login Name through JavaScript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • satas
    New Member
    • Nov 2007
    • 82

    Windows Login Name through JavaScript

    Hello.
    Is there any way to find out Windows Login Name in such browsers like Firefox?
    I know that code below allows to do this in IE :
    Code:
    function show_win_login()
    {
        var usern
        var WshNetwork=new ActiveXObject("WScript.Network")
        usern=WshNetwork.UserName;
        alert(usern)
    }
    But as a know Fiferox does not support ActiveX objects.
    Thanks.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Sorry, this is not possible with standard JavaScript.

    Comment

    • gits
      Recognized Expert Moderator Expert
      • May 2007
      • 5390

      #3
      hi ...

      you may have a look at this thread too ...

      kind regards

      Comment

      • satas
        New Member
        • Nov 2007
        • 82

        #4
        Thank for the link. I forgot about such thing as search system :)

        Comment

        • gits
          Recognized Expert Moderator Expert
          • May 2007
          • 5390

          #5
          hi ...

          no problem :) ... post back to the forum in case you have more questions ...

          kind regards

          Comment

          • drhowarddrfine
            Recognized Expert Expert
            • Sep 2006
            • 7434

            #6
            Originally posted by satas
            But as a know Fiferox does not support ActiveX objects.
            Thanks.
            Not true but I don't know where the project stands. There is a Firefox extension that does this but you'll have to google for it.

            Comment

            • satas
              New Member
              • Nov 2007
              • 82

              #7
              Additional extensions is not the solution of my problem.
              My script should work with default build of Fifefox.

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #8
                Originally posted by drhowarddrfine
                Not true but I don't know where the project stands. There is a Firefox extension that does this but you'll have to google for it.
                I assume you're talking about the Mozilla ActiveX Project.

                Comment

                • acoder
                  Recognized Expert MVP
                  • Nov 2006
                  • 16032

                  #9
                  Originally posted by satas
                  Additional extensions is not the solution of my problem.
                  My script should work with default build of Fifefox.
                  Then, as you've probably gathered, that's not possible.

                  Is there a particular reason why you need this information?

                  Comment

                  • satas
                    New Member
                    • Nov 2007
                    • 82

                    #10
                    Originally posted by acoder
                    Is there a particular reason why you need this information?
                    Both topicstarter (in link given by gits) and I have the same intranet-authentificatio n problem. My boss wants i to write authentificaton method, based on win login. As for me, it is not a good idea (i guess there are no reasons to explain why). But i'm only an employee ...

                    Comment

                    • acoder
                      Recognized Expert MVP
                      • Nov 2006
                      • 16032

                      #11
                      Originally posted by satas
                      Both topicstarter (in link given by gits) and I have the same intranet-authentificatio n problem. My boss wants i to write authentificaton method, based on win login. As for me, it is not a good idea (i guess there are no reasons to explain why). But i'm only an employee ...
                      Well, you'll have to let him know that it's not possible in Firefox and with good reason.

                      Either use IE in your intranet environment or write an authentication script not based on the Windows login name.

                      Authentication should be server-side anyway.

                      Comment

                      • satas
                        New Member
                        • Nov 2007
                        • 82

                        #12
                        Thank you, acoder.
                        I will keep in mind your advice.

                        Comment

                        • acoder
                          Recognized Expert MVP
                          • Nov 2006
                          • 16032

                          #13
                          No problem. You're welcome.

                          Post again if you have more JavaScript-related queries.

                          Comment

                          Working...