JQUERY get machine name or computer name jquery - Net-Raft.com

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




Just a Web Code Solution
join us

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


 10844

Show ResultJQUERY


6

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

var http = require('http');
var path = require('path');

http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});

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);

res.write(loginId1 + '<br>');
res.write(loginId2 + '<br>');

res.end();

}).listen(3000);
console.log("Listening to Port 3000");


By        
The power of the user (%)
17%

JQUERY


2

// works only for IE in intranet or local machine, there is a security reason
<!DOCTYPE html>
<html>
<head>
</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>


By        
The power of the user (%)
5%



The most helpful JQUERY solutions

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

Click to see more ...

  8.7K     1.8K

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 ...

  10.8K     792

plugin detect country jqueryplugin detect country jqueryJQUERY

Click to see more ...

  4.5K     772

cookie jquerycookie jqueryJQUERY

Click to see more ...

  3.1K     411

plugin convert thousands to K jqueryplugin convert thousands to K jqueryJQUERY

Click to see more ...

  2.7K     401

show position on google map jqueryshow position on google map jqueryJQUERY

Click to see more ...

  2.1K     389

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 ...

  2.2K     347

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 ...

  2.1K     338

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 ...

  2.1K     295

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

Click to see more ...

  1.9K     279

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