473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

problem with accessing system information in mozilla

Hello,
I am trying to get system information. I found a script. When i tried it, it is working in internet explorer. But it is not working with mozilla.

I think problem is with below statement as activeX might not work with mozilla.

Expand|Select|Wrap|Line Numbers
  1. var locator = new ActiveXObject ("WbemScripting.SWbemLocator");
Please anyone tell me the alternative solution for this.

Here is the script:


[HTML]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET
7.1">
<meta name="vs_targetSchema" content="http://
schemas.microsoft.com/intellisense/ie5">
<script id="clientEventHandlersJS" language="javascript">
<!--

function Button1_onclick() {
var locator = new ActiveXObject ("WbemScripting.SWbemLocator");
var service = locator.ConnectServer(".");
var properties = service.ExecQuery("SELECT * FROM Win32_OnBoardDevice");
var e = new Enumerator (properties);
document.write("<table border=1>");
dispHeading();
for (;!e.atEnd();e.moveNext ())
{
var p = e.item ();
document.write("<tr>");
document.write("<td>" + p.DeviceType + "</td>");
document.write("<td>" + p.Description + "</td>");
document.write("<td>" + p.Enabled + "</td>");
document.write("<td>" + p.Tag + "</td>");
document.write("</tr>");
}
document.write("</table>");
}

function dispHeading()
{
document.write("<thead>");
document.write("<td>DeviceType</td>");
document.write("<td>Description</td>");
document.write("<td>Enabled</td>");
document.write("<td>Tag</td>");
document.write("</thead>");
}

//-->
</script>
</head>
<body>
<INPUT id="Button1" type="button" value="Button"
name="Button1" language="javascript" onclick="return Button1_onclick()">
</body>
</html>[/HTML]
Dec 28 '07 #1
5 2493
gits
5,390 Expert Mod 4TB
hi ...

i think you will not be able to retrieve such information from any other browser then IE with ActiveX. a webpage shouldn't have such rights for a lot of reasons and so the standard javascript does not support this ...

kind regards
Dec 28 '07 #2
Is there any alternative way?


hi ...

i think you will not be able to retrieve such information from any other browser then IE with ActiveX. a webpage shouldn't have such rights for a lot of reasons and so the standard javascript does not support this ...

kind regards
Dec 28 '07 #3
gits
5,390 Expert Mod 4TB
i don't know one ... certainly no universal alternative ... what about all other browsers? for mozilla you may have a look at the privileges that mozilla may use to get system access ... but as i said ... you will have to build a special solution for every browser you want to support ...

kind regards
Dec 28 '07 #4
Can you please telle me how can i set previliges to mozilla to get access the system?

My requirement is to run the script in mozilla only.

would be great if you give me the solution for mozilla.
Jan 2 '08 #5
gits
5,390 Expert Mod 4TB
nope ... i can't but you may have a look here to start further investigations ... or here ...

kind regards
Jan 2 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Bart | last post by:
Hallo, I'm have a problem with the following script: function wr(s) { //Just got tired of writing document.write, //so I created a shorthand version document.write(s);
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
0
by: Joergen Bech | last post by:
Fairly new to ASP.NET 1.1. Getting the error below when running application on a web server outside of my control, but only the first time I run it: 1. After a long period of inactivity (or...
1
by: Bill | last post by:
Does anyone know how to fix this problem? On form submittal I'm getting the following error in Visual Studio 2005: The state information is invalid for this page and might be corrupted....
0
by: Brano | last post by:
Hi all, I have a asp.net website that has been live for about 2 weeks now and there were no problems with it. I have got a new server that is Win 2003 IIS 6.0 I have moved my application onto...
19
by: k.karthikit | last post by:
Hello all, In some hidden variable (<input type="hidden" name="hiddenId" value="test" /> ,i stored some value.I accessed the value "test" using var id = document.getElementById( 'hiddenId' );...
39
by: Martin Jørgensen | last post by:
Hi, I'm relatively new with C-programming and even though I've read about pointers and arrays many times, it's a topic that is a little confusing to me - at least at this moment: ---- 1)...
3
by: judy.j.miller | last post by:
Does anyone know why i can't access a form element value using dot notation in firefox, when i'm in a function. Works ok in the body. I'm trying to do this: var FarTemp = faren.temp.value; I...
4
by: Jon | last post by:
I wrote a VS 2005 C# express programme that accesses a web service. It works fine when there's a direct connection to the internet, but on two different PCs with internet access via a proxy, I get...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.