This topic is locked

calculating table fields in form and inline add

12/9/2009 2:50:32 AM
PHPRunner General questions
L
lechante author

Hello,
I was able to calculate two table fields with the script:
<script language="Javascript">

var xzz = document.forms.editform.value_eenheidsprijs_inho;

var yzz = document.forms.editform.value_aantal_inho;

xzz.onchange=xzz.onkeyup=yzz.onchange=yzz.onkeyup=function()

{document.forms.editform.value_totaal_inho.value=(document.forms.editform.value_aantal_inho.value * document.forms.editform.value_eenheidsprijs_inho.value);

}

</SCRIPT>
in the add and edit mode it works.
However in the inline add it does not.
I already copied the code in the list.
Wat am i doing wrong?

J
Jane 12/9/2009

Hi,
unfortunately this code will work on the add/edit pages only because there is no editform and value_Fieldname controls on the list page.