Activity Forums Salesforce® Discussions How to call the javascript function after selecting the value from the apex input list?

  • How to call the javascript function after selecting the value from the apex input list?

    Posted by Abhinav on March 22, 2016 at 4:13 pm

    <apex:inputText list="{!listOfExperts}" id="userInput" onChange="alert(this.value);"></apex:inputText>

    I want to call the Javascript function when I select any value from the listOfExperts. Onchange works when I click anywhere on the screen after selecting the value from the list. But I want to call that function as soon as I select the value from the listOfExperts.

    jitesh replied 8 years ago 2 Members · 1 Reply
  • 1 Reply
  • jitesh

    Member
    March 23, 2016 at 6:59 am

    <apex:inputText list="{!listOfStringElements}" id="userInput" html-oninput="alert(this.value);"></apex:inputText>

    Use html-onInput instead of onchange . I hope this works.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos