You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Pierre Henry <ph...@proconcept.ch> on 2003/01/21 16:45:52 UTC

How to specify a JSP Action method

Hi,


I am trying to use javascript to submit a form in a JSP. I have a grid to
present data and I want the header to be clickable to reorder the data. So I
have a form with hidden fields, and a function that sets a hidden field to
the desired value and submits the form.

My problem is that I don't have a submit field, so I can't specify the
method like in
<INPUT TYPE="submit" name="eventSubmit_doSomething" value="OK">.

Is there another way to specify the action method, or do I absolutely need
this submit field ?

Any ideas are appreciated !

Thanks

Pierre Henry

Here is some of my javascript and html :
	
<script language="JavaScript">
	function columnHeaderSubmit(column){
		window.document.forms['myform'].hidden_field.value=column;
	}
</script>
<form action="<jetspeed:dynamicUri/>" method=POST name="columnHeaderForm">
	<INPUT TYPE="hidden" name="hidden_field">
	<INPUT TYPE="hidden" name="action"
value="CustomizableXsqlPortlet1Action">
</form>

and for each table header I have sth like :
<th align="CENTER" >
<a href="#" onclick="javascript:columnHeaderSubmit("<%=currentColumn%>")">
	myvalue
</a></th>