This wouldn't be ideal, nor do I know if it even works but have you tested:
someFunction = function() { /* ... */ };
element.attr('oninput','someFunction()');
-blair
Duncan Anker wrote:
> I've been trying to use oninput to validate fields in firefox and have
> had zero luck with it the jQuery way:
>
> element.bind('input', ...)
>
> is just not cutting it. After some digging around on the net I *finally*
> found some useful, although mildly depressing, information about it.
> What it seems to boil down to is a bug in firefox (and mozilla codebase
> in general I expect).
>
> This is okay:
>
> <input oninput="...">
>
> So is this:
>
> element.addEventListener('input', ...)
>
> This doesn't work:
>
> element.oninput = function() { ...
>
> So I'm figuring that jQuery must perform its cross-platform magic using
> the latter form.
>
> Does anyone have any ideas about how to handle this? I want to stay
> unobtrusive, so I don't want the handlers defined in my HTML, and I want
> to be cross-platform, and I'd rather not implement a cross-platform
> event handler just for the one event, especially since there is already
> one in jQuery.
>
> Thoughts?
>
>
> Regards,
> Duncan
>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/