ICEcoffee
07-02-2004, 02:09 PM
Hi all
I've spent so much time trying to set these form values, it's getting silly not to mention frustrating. Here is what I am trying to do, (see code below):
A form is presented with a table partially completed, taking values stored in a database. The field I am interested in is "Price". Whether the user chages this value or not is not the issue (I think). What I'm tring to do is to set 2 hidden fields with values based on the value of "price".
I was told on a previous thread, the "value" option within the <input> tag, is text only and cant contain a call to a funtion. so how do I set the values of the fields called Vat and PriceMinusVat? I want do do some math on the Value of "Price" to get the values for the other 2 fields.
Please help whilst I still have hair.
====================================
<input name="Price" type="text" id="price" style="height:20px; font-family:Arial,Tahoma; font-size:11px " value="<?php echo $row_RSparts['Price']; ?>" size="10" maxlength="10">
<td height="18" colspan="2"><input type="submit" name="Submit4" value="Submit">
<input name="Callid" type="hidden" id="Callid43" value="<?php echo $HTTP_GET_VARS['Callid']; ?>">
<input name="ID" type="hidden" id="ID"> <br> </td>
<td height="18"><input name="PartPageNum" type="hidden" id="PartPageNum" value="<?php echo $row_RSpartpagenum['PageNum'] +1; ?>">
<input name="VAT" type="hidden" id="VAT" value="">
<input name="PriceMinusVAT" type="hidden" id="PriceMinusVAT" value=""></td>
=======================================
I've spent so much time trying to set these form values, it's getting silly not to mention frustrating. Here is what I am trying to do, (see code below):
A form is presented with a table partially completed, taking values stored in a database. The field I am interested in is "Price". Whether the user chages this value or not is not the issue (I think). What I'm tring to do is to set 2 hidden fields with values based on the value of "price".
I was told on a previous thread, the "value" option within the <input> tag, is text only and cant contain a call to a funtion. so how do I set the values of the fields called Vat and PriceMinusVat? I want do do some math on the Value of "Price" to get the values for the other 2 fields.
Please help whilst I still have hair.
====================================
<input name="Price" type="text" id="price" style="height:20px; font-family:Arial,Tahoma; font-size:11px " value="<?php echo $row_RSparts['Price']; ?>" size="10" maxlength="10">
<td height="18" colspan="2"><input type="submit" name="Submit4" value="Submit">
<input name="Callid" type="hidden" id="Callid43" value="<?php echo $HTTP_GET_VARS['Callid']; ?>">
<input name="ID" type="hidden" id="ID"> <br> </td>
<td height="18"><input name="PartPageNum" type="hidden" id="PartPageNum" value="<?php echo $row_RSpartpagenum['PageNum'] +1; ?>">
<input name="VAT" type="hidden" id="VAT" value="">
<input name="PriceMinusVAT" type="hidden" id="PriceMinusVAT" value=""></td>
=======================================