title: How can I pass a parameter to a setTimeout() callback?
body: <p>I have some JavaScript code that looks like:</p>
  <pre><code>function statechangedPostQuestion()
  {
    //alert(&quot;statechangedPostQuestion&quot;);
    if (xmlhttp.readyState==4)
    {
      var topicId = xmlhttp.responseText;
      setTimeout(&quot;postinsql(topicId)&quot;,4000);
    }
  }
  
  function postinsql(topicId)
  {
    //alert(topicId);
  }
  </code></pre>
  <p>I get an error that <code>topicId</code> is not defined
  Everything was working before I used the <code>setTimeout()</code> function.</p>
  <p>I want my <code>postinsql(topicId)</code> function to be called after some time.
  What should I do?</p>