function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SimrinSimrin 

input text value not taken in to account

Hello,

I execute a controller function using below fucntion
$(document).keypress(function(e) {
        if(e.which == 13) {
            actionSearchPlus(); 
        }
    });

The probelm is when i enter value in input text it is not detected unless we wlcik anywhere on screen before clicking enter.
 <apex:inputText value="{!searchSkillName}" styleClass="searchInput"/>

Any suggestion to encounter this issue.
Best Answer chosen by Simrin
ManojjenaManojjena
Hi Simrin,

try with below code it will help !
$(.searchInput).keypress(function(e) {
        if(e.which == 13) {
		   alert(1234);
            actionSearchPlus(); 
        }
    });

Let me know if it help !
Thanks 
Manoj