You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@click.apache.org by Tim Hooper <Th...@woh.rr.com> on 2009/02/11 14:55:54 UTC
TextField to post form
In my application I want to post the form when a textbox contained within the
form is changed, rather than forcing the user to click the submit button. I
tried setting an action listener on the TextBox, but that doesn't seem to fire
unless the user hits enter. I've also tried setting an attribute as follows:
description.setAttribute("onChange","this.form.submit();");
but that doesn't work either. Is this something that I can make happen with
this framework?
Thanks.
Tim
RE: TextField to post form
Posted by "Ozakca, Muzaffer" <mo...@indiana.edu>.
Try this:
description.setAttribute("onChange","document.getElementById(\"" + form.getId() + "\").submit()");
Also look at the generated HTML to see if there is anything missing in it. I also highly recommend Firebug for debugging javascript stuff like this.
Muzaffer
> -----Original Message-----
> From: news [mailto:news@ger.gmane.org] On Behalf Of Tim Hooper
> Sent: Wednesday, February 11, 2009 8:56 AM
> To: click-user@incubator.apache.org
> Subject: TextField to post form
>
> In my application I want to post the form when a textbox contained within
> the
> form is changed, rather than forcing the user to click the submit button. I
> tried setting an action listener on the TextBox, but that doesn't seem to
> fire
> unless the user hits enter. I've also tried setting an attribute as
> follows:
>
> description.setAttribute("onChange","this.form.submit();");
>
> but that doesn't work either. Is this something that I can make happen with
> this framework?
>
> Thanks.
>
> Tim