Receiving the message "Expected", "or" {"but found" # 44559 ". My code is as follows:
var valueid = $("div#center-box div#empid-textbox input").val();
if($("div#esd-names li#" + valueid).length > 0){
};
I get the value of what is entered in the text box input field, which in the case of "44559" cannot understand why I am getting this error.
I call my function to get the value with the following code. After you press ENTER in a specific text field, the value of the text field will be retrieved and launched with the list items to see if it exists ... if that happens - // DO SOMETHING //
$("div#center-box div#empid-textbox input.id").keypress(function(e){
key = e.which;
if(key===13){
valueid = $("div#center-box div#empid-textbox input").val();
if($("div#esd-names li[class*='" + valueid + "']").length > 0){
};
};
});
source
share