[eluser]Vitek[/eluser]
Hi again, clariz,
Looks like my tiredness kicked in after all! The problem is that I used blur() to bind a named function to each textbox, when in fact blur() only takes anonymous functions. You just need to make this small change:
Code:
function checkQuestion() {
$('#txtQuestion').val($(this).val());
$('#formCheck').ajaxSubmit({
success : function(response) {
if (response > 0) {
alert('Question already exists!');
}
}
});
}
Then replace both blur() calls from the original code with the following line:
Code:
$('#Questions > input').bind('blur', checkQuestion);
I got paranoid and just tested it all and it works fine for me. Let me know how it works for you.