Skip to Content
Former Member
Mar 31, 2006 at 12:01 PM

no update data with javascript function in HTMLB template



I have a problem with updating data in the SAPLBBP_PDH_CUF 100 template, in creating or modifying shopping card item.

Well, I have 2 customers fields : ZZBUDGET (which is a checkbox) and ZZAMOUNT (which is an input text field). I'va implemented a javascript function to make disabled the ZZAMOUNT field when we uncheck the

ZZBUDGET checkbox.

Here is the code concerned:

function activer(i)


var j = i + 1;

var coche = 'GT_DISPLAY_100-VALUE['i']';

var montant = 'GT_DISPLAY_100-VALUE['j']';



document.BBPForm.elements[montant].disabled = false;

document.BBPForm.elements[coche].value = 'X';


if(document.BBPForm.elements[coche].checked == false)


document.BBPForm.elements[montant].disabled = true;

document.BBPForm.elements[montant].value = '0,00';

document.BBPForm.elements[coche].value = ' ';




<input type="checkbox" name="GT_DISPLAY_100-VALUE[`j`]"

onClick="activer(`j`)" value="X" checked>

<input type="text" id="GT_DISPLAY_100-TEXT[`j1`]" name="GT_DISPLAY_100-VALUE[`j1`]" value="`GT_DISPLAY_100-VALUE[j+1]`" maxlength="013"



The problem is when i uncheck the ZZBUDGET checkbox (at this moment the ZZAMOUNT field is disabled and the value is 0,00), after refresh the data is not updated and the old ZZBUDGET and ZZAMOUNT values appears.

But when the ZZBUDGET is checked and when i change the ZZAMOUNT field, the data is correctly updated.

The problem is about the disabled javascript instruction. In fact, when i delete the line "document.BBPForm.elements[montant].disabled =

true;", it works. But i want to make the field disabled or not disabled.

Thank you for your help.