Wednesday, September 8, 2010

Where Can I Buy Milena`s Candle

related to an entity run without losing focus OnChange



OnChange event of the form fields in a CRM Dync have a peculiarity ... The event runs when you lose focus. This detail could create us some difficulties which we would be forced to run the event immediately after changing its value and not after it has lost focus of the field. Consider the following example:



SCENARIO
checkbox field is has the "courage" and a text field box "description." The "description" should be disabled unless you have selected the value field.
TROUBLESHOOTING
In the OnChange event of "value" drop:
if (crmForm.all.valor.DataValue == true) crmForm.all.descripcion.Disabled = false;
option that quoted above works if and only if after having placed a check in the "value" is given by clicking elsewhere on the form or if you press the TAB key.
employ to achieve our mission "attachEvent" and running at the time check is made to "value"
 

CORRECT SOLUTION

In the OnLoad event of the form will post the following function
MyFunction () {
if (crmForm.all.valor.DataValue == true) crmForm.all.descripcion.Disabled = false ;} crmForm.all.valor.attachEvent ('onclick', MyFunction)

0 comments:

Post a Comment