am having PHP code and javascript to multiply two values .... Here my problem is that ... if i click on the third box or button then only it shows the result .... I want the result on the third box without clicking it .... Help me

```
<script language="javascript">
    function multiply(arg_id)
    {
        var textValue1 = document.getElementById('CLS'+arg_id).value;
        var textValue2 = document.getElementById('rate'+arg_id).value;
        document.getElementById('valuation'+arg_id).value = textValue1 * textValue2;
    }
</script>
<?php
    $a="some query";
    $b=mysql_query($a);
    while($c=mysql_fetch_array($b))
    {
        echo "<td>".$CLOSINGstk."</td><input type='hidden' name='CLOSINGstk".$a."' value='".$CLOSINGstk."' id='CLS".$a."'>";
        echo "<td><input type='text' name='rate".$a."' id='rate".$a."'></td>";
        echo "<td><input type='button' name='valuation".$a."' id='valuation".$a."' onclick='multiply(".$a.");'></td>";
    }
?>

```