title: Passing two variables as string in javascript
body: <p>I get an error in html page for javascript 
  I am trying to pass string variables in function 
  PFB the code </p>
  
  <pre><code>document.write('&lt;input type = "submit" value = "Details" class = "myButton" onClick = "dealerDetailsService(\''+orderDate+'\,\''+dealerCode+'\')"&gt;&lt;/input&gt;');
  </code></pre>
  
  <p>gives error </p>
  
  <pre><code>Expected ')'
  </code></pre>