title: Java script call by reference
body: <p>I have to call setTimeout() with parameter grpname,but initially it has not been declared but i want it to refer to the same value if change afterwords...</p>
  
  <pre><code>function test(grpname) {
      $('.middle').load("display.php", {
          "grpname": grpname
      });
  }
  $(document).ready(function (e) {
          $('#inv').hide("fast");
          $('#t2').hide("fast");
          $('#username').click(function () {
              document.userid.username.value = "";
          });
          var grpname = document.userid.grpname.value;
          $('#signup').click(function () {
              $('#username').focus();
          });
          $('#signin').click(function () {
                  var username = document.userid.username.value;
                  setTimeout(test.bind(null, grpname), 1000);
                      ....
              } 
  </code></pre>