Read only / Disabled Field change value ??????????

This question is not answered

hi all i tried to change readonly or disabled field value this what i do

1- i made Remaining amount Read Only and put onchange script on paid amount when change it will subtract the payment amount - paid amount and the result
put it in readonly field (Remaining amount )  but it dosnt work

I try hiddenField & DataField & Field but no result still the value not changed.

I try to disable the field but when i save its put zero in payment amount and remaining amount


document.getElementById('Paym_RemAmount').value=Num;
document.getElementById('_HEDDRNPaym_RemAmount').value=Num;

document.getElementById('_DataPaym_RemAmount').value=Num;

 

 

Put nothing changed

All Replies
  • this work around sucsess  onload i made the field disabled and on the onchange script i made it disable false then do the calculations and then disabled

  • but again the fields value become zeros

  • Hi,

    As per post, we understood you wanted to set the value in the Read only field. To achieve the same you need to write the “OnChangeScript” on the paid amount field. Code will be something as shown below.

    //'Set the value in the read only field

                   if(document.getElementById("_DataPaym_RemAmount"))

        document.getElementById("_DataPaym_RemAmount").innerText  = <<Calculated Number>>;

     //’To Save value set the value in the Hidden Field

                if(document.getElementById(“_HIDDENPaym_RemAmount”))

                                    document.getElementById(“_HIDDENPaym_RemAmount”).value = <<Calculated Number>>;

     You can change it accordingly.

     Hope this will helps!

     

    Regards,

    Dinesh

    --------------------------------------------------------------------------------------------------------------------------------------
    New Release - Sage CRM for Sage ERP X3 - real-time, bi-directional, anywhere access.
    Celebrating 900+ Sage CRM Posts
    - http://www.greytrix.com/blogs/sagecrm/
    Sage Premier Gold Development Partner - Sage X3, Sage 100/300/500/Pro ERP & Sage CRM
    *Sage CRM Gold Development Partner of the Year 2004 and 2011*
    E-mail: crm@greytrix.com |  Twitter: greytrix

  • thanks Greytrix for help