SweetTech
SweetTech

Reputation: 21

How to fire a particular click event of button when entering data in text box

I have added three text box with three Buttons, I want that when enter first text box, event fire of first button as well as when enter on second text box, event fire of second button as on..

But facing the problem that this all in user control, and when enter in first text box, event fire of first button, and when enter second or third text box also event fired of first button.

I have added java script and Jquery function on key-press event of textbox(key == 13) But these functions not making check in user control.

Upvotes: 0

Views: 228

Answers (1)

Hukam
Hukam

Reputation: 1026

You can user jquery change method or focusin

$('#firsttxtbox').change(function() {
  alert('First textbox's text changed');
});

Upvotes: 1

Related Questions