You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chetan Pandey <cp...@bluesingapore.com> on 2006/10/16 04:42:12 UTC
Faking a Submit in JSP Page
Hi All:
I have a Dropdown which on change must go to Server Side for certain
processing.
I have a onClick Event which does that. But the problem is I must record the
value of other Form Elements and take them alsong with me which is unduly
cumbersome.
Somebody has ssuggested if you can fake a Submit when the drop-down changes,
you will not have to worry abt the values of other fiels.
So can anyone pls suggest if there is such a way that a "onChange" event on
my "select" Field causes "submit to happen.
Thanks,
Chetan
Re: Faking a Submit in JSP Page
Posted by Nuwan Chandrasoma <my...@gmail.com>.
Hi,
User a javascript to submit the form,
eg:-
function submitForm (actionUrl) {
document.forms[0].action = actionUrl;
document.forms[0].submit();
}
and call the method in the onchange event of the select
Thanks,
Nuwan.
----- Original Message -----
From: "Chetan Pandey" <cp...@bluesingapore.com>
To: "'Struts Users Mailing List'" <us...@struts.apache.org>
Sent: Monday, October 16, 2006 2:42 AM
Subject: Faking a Submit in JSP Page
> Hi All:
>
>
>
> I have a Dropdown which on change must go to Server Side for certain
> processing.
>
>
>
> I have a onClick Event which does that. But the problem is I must record
> the
> value of other Form Elements and take them alsong with me which is unduly
> cumbersome.
>
>
>
> Somebody has ssuggested if you can fake a Submit when the drop-down
> changes,
> you will not have to worry abt the values of other fiels.
>
>
>
> So can anyone pls suggest if there is such a way that a "onChange" event
> on
> my "select" Field causes "submit to happen.
>
>
>
> Thanks,
>
>
>
> Chetan
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org