jQuery expression in PHP
<p>I have tested the following script is working in my PHP page:</p>

<pre><code>&lt;script&gt;
  function calculate&lt;?=$performance_item_id;?&gt;(){
    alert('&lt;?=$performance_item_id;?&gt;');
    $.post('complete_calculate.php',{
      tid: document.getElementById('performance_item_id&lt;?=$performance_item_id;?&gt;').value
    },
    function(output){
      $('#complete_percentage&lt;?=$performance_item_id;?&gt;').html(output);
    });
  }
  calculate&lt;?=$performance_item_id;?&gt;()
&lt;/script&gt;
&lt;span id='complete_percentage&lt;?=$performance_item_id;?&gt;'&gt;&lt;/span&gt;
</code></pre>

<p>First, I would like to change the post value to something like <code>"$('.complete&lt;?=$performance_item_id;?&gt;').val();"</code>, that is, not get something from an id field, but gather values from several fields having the same class.</p>

<p>Second, I would like to use a text box to hold the HTML output, while "<code>&lt;input type = "text" id='complete_percentage&lt;?=$performance_item_id;?&gt;' name = "complete_percentage[]" size = "5" value="0"&gt;</code>" is not working! Please help! Thanks!</p>
