onChange execute JSP

try to be more clear, i’m in lack of ideas in this problem.

<logic:present name="StateList" scope="session">
<td align="left"><font color="red"><b><b>*</b></b></font>&nbsp;<b>Select State</td>
<td>
<html:select  property="selectedState" onChange="execute(this.form)">
<html:option value="-1">Select</html:option>
<html:options collection="StateList" property="label" labelProperty="value" />
</html:select>
</td>
</tr>
<tr></tr>
</logic:present>	

on calling onChange i want to reload this JSP without refreshing parameter.Because On the basis of selected value i have to perform some other features.I am able to do using struts,but i dont want to use struts.
using struts i can do like this:

function execute(frm)
{
    frm.action="Inedex.do?method=process";
    frm.submit();
}

process method is written in Indexaction.java.which is returning my same JSP(return mapping.findforward(“this”)).where “this” is mapped to Index.jsp and i am attaining my goal.But i dont want to use struts.
I have spend hours trying to play around with this but have got nowhere.
Your help is much appreciated.

If you wanna more information please let me know…
waiting for reply

Where is the “form” element? I assume the code above is just a snippet from within the form element - correct?

You do not have to use Struts just to use that Javascript function. For a quick test, try this:


<logic:present name="StateList" scope="session">
<td align="left"><font color="red"><b><b>*</b></b></font>&nbsp;<b>Select State</td>
<td>

<html:select
  property="selectedState"
  onChange=[b]"this.form.action='Inedex.do?method=process'; this.form.submit()"[/b]>

<html:option value="-1">Select</html:option>
<html:options collection="StateList" property="label" labelProperty="value" />
</html:select>
</td>
</tr>
<tr></tr>
</logic:present>

Please verify that “Inedex” is spelled and capitalized correctly.

Do some searching in the Java/JSP forum - you might find something related to this.

Sir,
Thanks for reply,you are right,this code is snippet from within the form element.
But sir again you are using “process” method of form class…which i dont want.
I dont want to use any method of action class.
waiting for reply…
With Regards.

sorry,
mistake,please assume this line
“you are using “process” method of form class”
as
“you are using “process” method of action class”

Ok, I’m confused.

Did you look around in the Java/JSP forum?