title: not able to pass value to javascript function from jquery's success
body: <p>I am calling javascript function filename in success of jquery  as below , but i am not able to get p in javascript </p>
  
  <pre><code>    success: function(result) {
   var htmlString = [result];
          for (i = 0; i &lt; htmlString.length; i++) {
              var p = htmlString[i].Number;
              $('#MyGrid tbody').append('&lt;tr&gt;&lt;td&gt;&lt;a rel="' + p + 
                  '" href="#" onclick="filename(p);" class="filePreview"&gt;&lt;/a&gt;&lt;/tr&gt;');
          }
      }
  </code></pre>
  
  <p>how to get p in filename?</p>
  
  <p>thanks,</p>
  
  <p>michaeld</p>