title: calling child_process from nodejs
body: <p>I'm having an html file with a hyperlink which calls javascript function.The javascript function has to call a batch file...this all should happen from Node.js</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;sample&lt;/title&gt;
  &lt;script src="child.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;a href="#" onclick="call()"&gt;click here&lt;/a&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>child.js</p>
  
  <pre><code>function call()
  {
  
  var spawn = require('child_process').spawn,
  ls = spawn('append.bat');
  }
  </code></pre>
  
  <p>I'm getting error like this....</p>
  
  <pre><code>ReferenceError: require is not defined
  var spawn = require('child_process').spawn,
  </code></pre>
  
  <p>any answer..pls reply...</p>