0

Check this code

function readvalue() {
var WshShell = new ActiveXObject("WScript.Shell");

var value = WshShell.RegRead("HKLM\\SOFTWARE\\JavaSoft\\Java Runtime Environment\\CurrentVersion");
write("<text class="
name ">");
write(value);
write("</text>");
}

http://jsfiddle.net/SrikanthYadake/2E5rE/2/

I am unable to present the text in variable "value" inside the blue box.

Please help.

1
  • Which browser you are using? Active-x objects only work with IE. Commented Jul 11, 2013 at 11:45

2 Answers 2

1

Try with below code

function readvalue() {
    var WshShell = new ActiveXObject("WScript.Shell");

    var value = WshShell.RegRead("HKLM\\SOFTWARE\\JavaSoft\\Java Runtime Environment\\CurrentVersion");
    document.write("<text class='name'>" + value+"</text>" );
}

Fiddle updated

Sign up to request clarification or add additional context in comments.

17 Comments

that works,but the blue box disappears.. it is has someting to do with css
There's no <text> element ;-)
You can use <div> instead of <text>
@Sriyad Try to use jQuery html instead of document.write(). Check this link
cool, im unable to get the registry value now! the box and the image came
|
0

check the below code:

write("<text class="
name ">");
write(value);
write("</text>");

It have some error. so replace with:

write("<text class='name'>");
write(value);
write("</text>");

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.