Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Sep 2014
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Getting UserID and Password from Windows and connect to database

    Hi,
    I am very new in programming. I wrote a html page which has some links to some websites.
    In my html source code I want to get windows user ID and password ( which is from our AD), then the user will be able to connect those website which I have link in my html code. ( All users in our AD are able to connect to all websites )
    How can I do that?
    Can you show me a good link in java script to do that?
    With this code I able to find windows User ID, but I am looking a way in java script to use this code to connect user to database :

    <html>
    <head>
    <title>Windows Username</title>
    </head>
    <body>
    <script type="text/javascript">
    var WinNetwork = new ActiveXObject("WScript.Network");
    alert(WinNetwork.UserName);
    </script>
    </body>
    </html>[/I]

    Or any idea you think connect me to datadbase
    I really appreciate your help!
    mm pp

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,243
    Thanks
    203
    Thanked 2,555 Times in 2,533 Posts
    See:- http://www.codingforums.com/showthread.php?t=17515.
    You will not get any reply in this forum which is intended to be used only to
    post a completed (working) script for showcasing/benefit of others.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #3
    New to the CF scene
    Join Date
    Sep 2014
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Sorry, I was just looking for some good links how to these codes correctly. if it is not usual just forget about it. Thanks

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,118
    Thanks
    80
    Thanked 4,555 Times in 4,519 Posts
    but I am looking a way in java script to use this code to connect user to database
    This is not really a good idae, but if you must do it you could use and ADODB.Database AxtiveX object.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •