You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Joe Yuen <jo...@chisq.com> on 2006/12/05 17:39:06 UTC

problem with using dispatchaction

 

I am currently using dispatchaction with good success however I recently encountered a situation that I hope someone has a suggestion for.
 
I am implementing dependent drop down lists in one of my pages. I would like to use the onchange attribute with the html:select tag.
 
My question is what should my javascript routine look like so that the form is submitted to the right method in my action class that uses dispatchaction.
 
I tried doing this to get it to submit to my edit method, but it doesn't seem to work:
<script language="JavaScript">

function sub() {

document.forms[0].action.value='edit';

document.forms[0].submit();

}

</script>

 
 
Thanks,
-Joe Yuen