Find the input box that triggered the event
<p>I have a html script with the following code </p>

<pre><code>   &lt;input type="text" name="" id="PrDisplay" onkeyup="calcCosting()"/&gt;&lt;/td&gt;
   &lt;input type="text" name="" id="PrFreight" onkeyup="calcCosting()"/&gt;&lt;/td&gt;
</code></pre>

<p>I have many lines like this and when any input box has an entry then my JQ function is triggered </p>

<p>this is the Js code </p>

<pre><code>function calcCosting() {

// calculate the sum of all the chargable items 
dis = $('#PrDisplay').val() /1   ;
fre = $('#PrFreight').val() /1 ;    
pro = $('#PrProcess').val()/1   ;   
str = $('#PrStructual').val() /1  ; 
gro = $('#PrGroundworks').val()/1 ; 
sof = $('#PrSoftware').val() /1 ;   
har = $('#PrHardware').val() /1 ;   
add = $('#PrAdditional').val() /1 ;

tot  = dis + fre + pro + str + gro + sof + har + add;
$('#PrTotal').val(tot) ; // display the total 
    }
</code></pre>

<p>This works fine and adds up all the totals to display them in a test box with the id PrTotal. </p>

<p>What I want to do in my JQ script is find the Text box that triggered the call to the script, or which box has focus as is call my script. I hope this makes sense !! , I really cant get to grips with the THIS element can somebody please give me some pointers ?</p>

<p>thanks in advance </p>
