Hi
I've got some web pages on the Intranet at work which I'd like to 'enhance'.
Is in possible to display the local computer name to the user on a web page ?
i.e. the name that the local %computername% system variable would give ?
Thanks
Paul
Hi
I've got some web pages on the Intranet at work which I'd like to 'enhance'.
Is in possible to display the local computer name to the user on a web page ?
i.e. the name that the local %computername% system variable would give ?
Thanks
Paul
Hello I am not sure I completely understand your question
Hi
Ok, I'll try again....
All computers have their own name, i.e. the one set under
Control Panel | System Properties | Computer Name
(the one that can be displayed by entering echo %computername% from a command prompt)
I'm hoping there is a way that this can be read and displayed on a web page, basically so something very simple like "You are using computer WKSTN001" can be put on screen.
Does that help ?
Paul
(opens a terminal and tries it in zsh)All computers have their own name, i.e. the one set under
Control Panel | System Properties | Computer Name
(the one that can be displayed by entering echo %computername% from a command prompt)
Nope
And there we have the problem: not all computers do have a "computer name." You could probably do something with ActiveX or Java, but other than that, it's not possible without making some adjustments to the browsers on each client machine.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
You might be able to base something off IP if you could set a group of relationships... Use an array where $array['someIP'] = "someComputer";
(this is php syntax... not too different than other languages though, though, aside from the $ for identifying variables.)
Note that I'm talking about local IP on the network... this would be harder (maybe impossible) to implement if you were doing something web based and wanted to identify the computer from within the network that was sending the information.
Is this for an intranet or the internet?
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
With I.E try
Gives a pop up alert with the computer's name<!-- Start of ActiveX -->
<Script language="javascript">
var oNetwork = new ActiveXObject("WScript.Network")
var sComputerName = oNetwork.ComputerName
alert(sComputerName);
</script>
<!-- End of ActiveX -->
There we go
Note that since it's using ActiveX, it's IE/Win only, and it may pop up a warning alert if the server isn't in the "trusted" IE zone.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Thanks,
I'll give it a go when I'm back at work on Monday
(Friday off with this terrible weather we're having...)
Much appreciated
Paul
Bookmarks