jQuery - Retrieve an Input fields' name, and then change it
<p>I need to get the name of each input field within a row, and change it. I am having difficulty in finding the proper syntax to reference the name field. For example:  </p>

<pre><code>&lt;tr id="row_0" class="dataRow"&gt;
    &lt;input type="text" class="tabcell" name="_0-3" size="6" value=7.0 /&gt;
    &lt;input type="text" class="tabcell" name="_0-7" size="6" value=7.6 /&gt;
</code></pre>

<p>I iterate over the rows and want to rename each td field:</p>

<pre><code>var namePrefix = "AFS";
$('td:eq(0)', this).each(function(e) {
    $('td:eq(0) input[name]', this).replaceWith($(namePrefix  + 'td:eq(0) input', this).val()); 
.... etc ... 
</code></pre>

<p>But this does not work.
The end result should look like this:</p>

<pre><code>&lt;tr id="row_0" class="dataRow"&gt;
    &lt;input type="text" class="tabcell" name="AFS_0-3" size="6" value=7.0 /&gt;
    &lt;input type="text" class="tabcell" name="AFS_0-7" size="6" value=7.6/&gt;
</code></pre>

<p>Anyone know how I can reference the input field name and change it?</p>

<p>Thanks.<br>
Vic</p>
