You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rushikesh Thakkar <th...@gmail.com> on 2008/02/27 11:46:08 UTC

Javascript Form-submission problem

The UI of my application is divided in 3 parts, which looks almost similar
to the UI of Eclipse IDE. The user selects operation from 'div' sitting on
the left, then the *upper right div* shows a request *form* and the div
sitting below it shows the result.

I need to submit the form to two different actions: one using submit button,
and the other on 'onChange' event of html 'select' element (to refresh the
form, i.e. to disable some input elements).

I am able to submit the form using this javascript code:
<s:select ..........  onchange="this.form.action='prepareUpdateScreen.action';
this.form.submit();" />. But the problem is: 'The result of this action is
displayed on entire browser', (I mean, it doesn't work like <s:submit
theme="ajax" targets="requestDiv"/> and display the result in a div w-o
changing the UI).

I tried using <s:a /> for manually refreshing the screen instead of
javascript onChange code, but I didn't get any success yet.

Kindly help me.!!

regards,
Rushikesh