Hello,
When the value is entered, I want an alert, its a copy/paste text box, using jquery
('#test).bind('onblur',function(){
var h = ('#test).attr('value');
alert(h);
});
<input type=text id=test>
Thanks Jean
Hello,
When the value is entered, I want an alert, its a copy/paste text box, using jquery
('#test).bind('onblur',function(){
var h = ('#test).attr('value');
alert(h);
});
<input type=text id=test>
Thanks Jean
typo in function()
replace 'onblur' with 'blur' or 'focusout'
blur and focusout only fire wenn that element loses the focus.
Kind Regards
--Andy
Not knowing your full HTML source, I would imagine:
$('#test').blur(function()
{
alert(this.value);
});
should do the trick. The code you have entered doesn't seem to be valid JavaScript, and it looks like you might be trying to complicate the event attaching and handler with too much code.
Try this:
<input type="text" id="test" />
JQuery
$(function(){
$('#test').blur(function(){
alert($(this).val());
});
});
Not quite sure what you want, but is it something like this?
$("#test").change(function() { alert($(this).val()); });
The alert shows the text entered in the box when it is changed.
('#test input').bind('blur',function(){
var h = ('#test).attr('value');
alert(h);
});
adding an input in the selector should work for the blur