top of page

How to run Java Script


There are many Java scripts available that can assist you with data analysis. Running a java script is quite easy - they run in a web browser when embedded in a html file.

This sample Java 'Digital clock' script can be found here

<html> <head> <title>Javascript Digital Clock - An example of a Timer</title>

<script language="javascript" type="text/javascript">var dateform speed=1000 tid=0;function dodate(){f.date.value=new Date();tid=window.setTimeout("dodate()",speed);}function start(x){f=x tid=window.setTimeout("dodate()",speed);}function cleartid(){window.clearTimeout(tid);}</script>

</head>

<body onload="start(document.dateform) ;"> <center> Digital Clock <FORM name="dateform" action="post"> <input type="text" name="date" size=30> </FORM> </center>

<br><br> <a href="jsindex.html"> More java script examples </a> <br>

</body> </html>

. . . it can be pasted into a text file [make sure the returns appear in the right places] and then save and change the extension to .html. Depending on your settings in Windows, simply clicking on the file should open it in Internet Explorer. You will likely get a warning that running scripts are restricted and be prompted by IE to allow block content. Click 'Allow blocked content' and let the script run.

You should get a result that looks just like the below, where I have embedded the Java script

If a Java script is not embedded in an html file, you can run it by downloading Node, from this site, https://nodejs.org/en/ . Once Node is installed, you should find it your Programs menu Open it and simply type in:

node C:\folder\hello.js

Java scripts not embedded in html files are saved with the extension .js.


Sean O'Shea has more than 20 years of experience in the litigation support field with major law firms in New York and San Francisco.   He is an ACEDS Certified eDiscovery Specialist and a Relativity Certified Administrator.

​

The views expressed in this blog are those of the owner and do not reflect the views or opinions of the owner’s employer.

​

If you have a question or comment about this blog, please make a submission using the form to the right. 

Your details were sent successfully!

© 2015 by Sean O'Shea . Proudly created with Wix.com

bottom of page