×Welcome aboard! We are happy you are here and wish you good net-raft!



Together We Can Simplify The World
Just a Web Code Solution

the current number of solutions:  2529

You Can Join us too!

it news shareTrending in the Internet industry

Discover and Share trending in the Internet industry from all around the world.
Click to see more ...

  19     276

How to get client machine name or computer name with jquery?

(jquery client machine name computer)

- JQUERY

 3241

created: 16 months agoJQUERY

1

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js "></script>
</head>

<body>

<script type="text/javascript">

$(document).ready(function () {

try
{
var ax = new ActiveXObject("WScript.Network");
alert('User: ' + ax.UserName );
alert('Computer: ' + ax.ComputerName);
}
catch (e)
{
alert('Permission to access computer name is denied');
}

});

</script>

</body>

</html>

     

The power of the user (%)

3%

created: 15 months agoJQUERY

1

// this is the only solution, works only for IE in intranet or local machine, there is a security reason
// You get username or computer name via VBA or VB.NET (Environ$("username"),Environ$("computername")), but javascript, jquery ... all of client side is security reason

try
{
var ax = new ActiveXObject("WScript.Network");
alert('User: ' + ax.UserName );
alert('Computer: ' + ax.ComputerName);
}
catch (e)
{
alert('Permission to access computer name is denied');
}

});

     

The power of the user (%)

74%

created: 15 months agoJQUERY

2

// you need to use javascript framework Node.js
// check out the code below

// try this ... this works
// at first you install "npm install --save path"

//put this code into app.js

var path = require('path');
var userName = process.env['USERPROFILE'].split(path.sep)[2];
var loginId = path.join("domainName",userName);
console.log(loginId);

// type "node app.js" in command prompt

     

The power of the user (%)

11%

created: 15 months agoJQUERY

2

// this is the complete code for javascript framework Node.js
// you can get domainName and computerName
// at first you install "npm install --save path"

//put this code into app.js

var path = require('path');
var userName = process.env['USERPROFILE'].split(path.sep)[2];
var computerName = process.env['COMPUTERNAME'];
var loginId1 = path.join("domainName",userName);
var loginId2 = path.join("computerName",computerName);
console.log(loginId1);
console.log(loginId2);

// type "node app.js" in command prompt

     

The power of the user (%)

10%

created: 5 months agoJQUERY

1

// important : ActiveXObject works only for IE (new ActiveXObject("ADODB.Connection"))

     

The power of the user (%)

74%



The most helpful JQUERY solutions

plugin get client ip address using jqueryplugin get client ip address using jqueryJQUERY

Click to see more ...

  3.6K     1.2K

How to get client machine name or computer name with jquery?How to get client machine name or computer name with jquery?JQUERY

Click to see more ...

  3.2K     643

plugin detect country jqueryplugin detect country jqueryJQUERY

Click to see more ...

  1.4K     531

cookie jquerycookie jqueryJQUERY

Click to see more ...

  1.1K     352

How to detect the version of IE browser using jquery ?How to detect the version of IE browser using jquery ?JQUERY

Click to see more ...

  732     304

plugin convert thousands to K jqueryplugin convert thousands to K jqueryJQUERY

Click to see more ...

  626     241

How to get top, right, left, bottom position of element div using jquery ?How to get top, right, left, bottom position of element div using jquery ?JQUERY

Click to see more ...

  518     205

how to get ip address using jquery ?how to get ip address using jquery ?JQUERY

Click to see more ...

  468     193

how to create a jquery plugin for converting date to days ago, month ago and year ago ?how to create a jquery plugin for converting date to days ago, month ago and year ago ?JQUERY

Click to see more ...

  413     186

how to get the value from an object using jquery ?how to get the value from an object using jquery ?JQUERY

Click to see more ...

  345     176