Hi,
I know that this is the general behaviour of the form. I will explain my problem in detail.
<form name="abc" action="" method=post>
<input type="hidden" name="retry" value="N"/>
<display:table name="someList%>" requestURI="abc.do">
<display:column property="recipientCode" title="Recipient"/>
</display:table>
<input type="submit" class="button" value="Retry" />
</form>
<display:column property="recipientCode" title="Recipient"/>
</display:table>
<input type="submit" class="button" value="Retry" />
</form>
in this code, in the JS function validateRetry(), I set the hidden variable retry to Y. This is to tell my java code(may be Action) that the retry button has been clicked. My Action code has some specific code when retry=Y. After the Action code, the same page is displayed again. At this time the page link urls of the display tag table show retry=Y and hence when I click on another page in the display tag table, again retry=Y is sent to Action which is not correct.
I think one way to get around this is by having the struts form html elements rather than normal HTML form elements. But the question is how would I fix this in non struts type of environment?
Thanks.
[EMAIL PROTECTED] wrote:
Short answer: Use method="post" in your <form>
Long answer: Any variable you define (hidden or not) will get passed to the server when you submit a form. GET will pass variables in a query string (all variables), and POST will pass them through the HTTP header. Whether to use GET or POST depends on your application. Generally, use GET if your page is stateless, and POST if your page contains state or is part of a stateful process.
[EMAIL PROTECTED] wrote on 05/04/2004 11:09:53 AM:
> Hi,
> I have got a display tag table in HTML form. The HTML form also
> contains the hidden variable to identify the one out of different
> buttons pressed in the form. Once some value is set to to a
> particular hidden variable and the form is submitted, the hidden
> variable gets appended to querystring and then same value of that
> hidden variable is always sent even when I click on the different
> page of the display tag table. And this is because the hidden
> variable gets appended to the querystring.
>
> Does anyone know to disable appending these hidden variables to the
> querystring?
>
> thanks,
> Kamalakar
> Do you Yahoo!?
> Win a $20,000 Career Makeover at Yahoo! HotJobs
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs

