Thanks, it works great but my question, my fault, was not put the right way.
I still have to check the box for the tax amount to appear in the field.
However if I uncheck the box, the tax remains displayed.
How can I display the tax without checking - unchecking the box?
The tax amount 0.00 should display if the box is checked.
I am not sure I provide all necessary variables in this post...
Here is the code which does it:
Code:
// VAT
if ( isset($state) && !empty($state) && isset($cur_sales_tax) && !empty($cur_sales_tax) ) {
$class = ($class == 'even')? 'odd': 'even';
echo '<tr class="' . $class . '">
<td colspan="2">Check if you live outside ' . $state . '
<input type="checkbox" name="sales_tax" tabindex="' . ($num_products + 2) . '" onclick="doSalesTax(this,this.form)"></td>
<td class="lbl" colspan="2">VAT 21%:
€<input class="cur" type="text" name="tax_amt" size="8" value="0" readonly onfocus="this.blur()"></td>
</tr>
';
}