We have a customized Opportunity view page that overrides the standard page in our org. And now we need to add a controlling picklist to this page:

Controlling field (picklist): Re-sign term
Dependent field (multi-select picklist): Re-sign Notice Period
We also have another text field: Re-sign term (other)

Our logic is: if Re-sign term picklist value equals 'Other', the Re-sign term (other) textbox shoud be displayed, otherwise, keep hidden. We are trying to use Jquery to achieve this, but unfortunately, Jquery .change() event seems not working on this case (Re-sign term value changed, jquery is not triggered).

However, if we remove the field dependency, it is working fine. Any advice?

  • FWIW, I'm pretty sure that the salesforce native library doesn't fire change events. You might try using mutator events instead. – sfdcfox Jul 22 '15 at 3:29
  • Thanks for the advice, and I'm now trying to use 'DOMSubtreeModified' instead. Still investigate on that, and hopefully could get it resolved – Stanley Jul 22 '15 at 3:49

Have tried a couple of approaches, and the solution so far is using mutation event instead of .change(). The one I used is: DOMCharacterDataModified

$('[id$=elementId]').bind('DOMCharacterDataModified', function(){

  Your logic here..... 


This is working in chrome browser

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.