Archives by Tag 'onchange'

CRM Common Javascript File

By Carlton Colter - Last updated: Tuesday, October 13, 2009

Need to reference an external javascript file to make functions available in change events and in an onload? Here’s how!

Click to continue reading
Click Here To View Post With Syntax Highlighting

Changing PickList Values on Yes/No Form Field Change

By Carlton Colter - Last updated: Saturday, October 3, 2009

Recently on the Microsoft forums someone asked how to change the values of a picklist based on the yes no value of a boolean field. Just add this script to the OnChange event of the yes/no field.

Click to continue reading
Click Here To View Post With Syntax Highlighting

Remove special characters on value change.

By Carlton Colter - Last updated: Thursday, October 1, 2009

This blog entry contains some helpful information about removing special characters from a string using javascript. I was able to modify it to be just a few of code in an onchange event. Just rename new_name to the attribute your correcting.

if (crmForm.all.new_name.DataValue && crmForm.all.new_name.DataValue.length >0)
{
crmForm.all.new_name.DataValue = crmForm.all.new_name.DataValue.replace(/[^a-zA-Z 0-9]+/g,'');
}

Click Here To View Post With Syntax Highlighting