i have 2 input of type text (Id and name). I want to search id in my database and find name related to this id and set it in input of name and also disable this input. For this mean i write a function(with java language) that get name related to id input. But i test it with a submit button that is not what i want.1) I want to call function when id input is fill 2)also the name input disable option set to true, when id input is empty it change to false This is my jsp code:
<input type="text" id="id">
<input type="text" id="name">
<input type="submit" formaction="myFunc">