Yaps that's right, Jquery cannot trigger the events that was not
binded by jquery. So I tried to bind the javascript event using
jquery. and it works ;) Thank you anyway ...
I wish jquery can trigger any trigger even it doesnt assign by jquery
(like from natural javascript) because it would be usefull if i use in
some framework who has js trigger on its component.
On May 2, 10:43 pm, BlueCockatoo <[EMAIL PROTECTED]> wrote:
> I'm not sure that jQuery picks up on events that weren't assigned
> through jQuery... Maybe it does but I've only been using it as
> "unobtrusive javascript" and so haven't tried to trigger an event that
> I didn't bind through jQuery yet.
>
> Try this and see if it doesn't work for you instead:
>
> $(document).ready( function() {
> $("#myname").blur( function() {
> dosomething(this.value);
> });
>
> });
>
> Then your call to $("#myname").trigger('blur'); should work, or just
> abbreviate it and use $("#myname").blur(); instead.
>
> HTH!
>
> On May 1, 7:23 pm,Adwin Wijaya <[EMAIL PROTECTED]> wrote:
>
> > I have a field with onblur function like this
>
> > > onblur='dosomething(this.value);'/>
>
> > and then in a button i put
> > $('#myname').trigger('blur'); ...
>
> > it seems the trigger wont call "dosomething" when i call $
> > ('#myname').trigger('blur');