web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

OnChangeEvent for Checkbox does not work with first click

(0) ShareShare
ReportReport
Posted on by 195

 Dear all,

in a entity I created a Checkbox, if the checkbox is not checked the Textfieldshould be hidden!

When click the Checkbox nothing happens. But when I click after the fist somewhere in the window the Textfields are hidden!

 Why must I do an additional click! Is there a possibility to change it?

 

 Best regards

Sebastian

*This post is locked for comments

I have the same question (0)
  • Yaniv Arditi Profile Picture
    3,990 on at

    Hi Sebastian,

    The field OnChange event is fired only when the field has lost focus (and the content has changed), meaning the user clicked the tab key or mouse clicked any other element other than the field. This is how the application 'knows' the user has finished feeding content into the field.

    Using JavaScript events you can catch the checkbox click event itself and use it to hide the field without waiting for the focus shift.

    Hope this helps,

    Yaniv Arditi

  • Sebastian Glitsch Profile Picture
    195 on at

    Hi Yaniv,

     

    thank you very much.

     

    Its working.

     

    Best regards

    Sebastian

  • Raji Kamber Profile Picture
    165 on at
    Can you pass the javascript code
  • Sebastian Glitsch Profile Picture
    195 on at

    Paste this script into the onLoad-Function of the form!

     

     crmForm.all.ans_abweichendelieferanschrift.onclick = function()

    //This function activates the onclick-function for this form!!!!


    After that you can add the logic of the function!

    {
       if (crmForm.all.ans_abweichendelieferanschrift.checked != true) {

    } else{

    }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans