• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javascript not working in my computer

 
Mainak Goswami
Ranch Hand
Posts: 52
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In my PC java script is not working. I am using a simple Html page with java script embedded in it: e.g.

<html>
<body>
<script language=�JavaScript�>
Document.write(�Hello�);
</script>
</body>
</html>

I have tried to run this html page with different browsers : IE6 , Mozilla,netscape.. But no output is given. Can anyone please help me in this regard?

Does anything depends on the version of the Windows or on the JRE version?

Thanks
Mainak
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaScript is case-sensitive. Try "document" instead of "Document". Then it works fine for me on Firefox. JavaScript has nothing to do with Java, by the way, so the JRE version is irrelevant.
 
Mainak Goswami
Ranch Hand
Posts: 52
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By mistake i have written here "D"ocument ....However I have been trying with document.write().

Actually it is not working for any java script commands. E.g. alert

Please let me know if any of the versions of the windows / JRE prohibits this.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Works fine in IE as well, with "d", but not with "D". Make sure you use proper quotes and double-quotes, not the curly ones you used in your post. In Firefox you can see JavaScript errors in the JavaScript Console, which you'll find in the Tools menu. It's got nothing to do with the Windows version, and neither -see above- with the JRE version.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
where are you running this file system (desktop) or on a server part on your computer, or from the web?

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic