title: Javascript function call with arguments
body: <p>I am developing a mobile application using phonegap and jquery mobile. I have this function which has to pass a variable to another function. It goes something like this:</p>
  
  <pre><code>    $.each(response.records, function(i, contact) {
         var url = contact.Id;
         var newLi = $("&lt;li&gt;&lt;a href='javascript:dothis("+url+")'&gt;" + (i+1) + " - " + contact.Name + " - Company "+contact.Company+"&lt;/a&gt;&lt;/li&gt;");
             ul.append(newLi);}
  </code></pre>
  
  <p>I have the dothis(argument) function but it does not get called when i put in the variable "url". When i erase the argument, it works. Please Help!</p>