Do you confirm that the submit erase all parameters ?

I will replace the html:link by a button, 
but I have the problem for the html:select onchange.
I should use a submit to display my form again.
Is there another way ?

I tried to use a JavaScript but the submit erase parameters.
At the end of the queryString (parameter of the HttpServletRequest) 
I don't have the string "typeUpdate=change".

<script>
var enableSubmit=false;
function updateForm(form) {
        if(enableSubmit) {
           form.action ='/my.do?typeUpdate=change';
           form.submit();
        }
}
</script>

If I remove the submit in the JavaScript the action is not called.

<html:select ... onchange="updateForm(document.forms[0]);"/>

Has someone already use a submit for combo change ?
I don't know very well JavaScript there is perhaps a syntax error.
I read some example with return value (true) in the JavaScript.

Thanks in advane for your help
Sandra

-----Original Message-----
From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
Sent: 13 May 2004 12:32
To: Struts Users Mailing List
Subject: Re: Html:link and save form



A link in HTML does not submit a form. Only submit inputs (buttons) an
images input does.
You can use javascript to do it (as you did), but then it overrides the href
set on the link (/myAction.do) and its
parameters.

Nico.


> I have a form with a htlm:link
>
> <html:link page="/myAction.do" paramId="method" paramScope="page"
> paramName="address" onclick="document.forms[0].submit();">
>
> I need to add submit on the onclick to have changes of the form.
>
> If I don't make submit the state of the form is not saved.
>
> Is it a bug ?
>
> Sandra
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



Our name has changed.  Please update your address book to the following
format: "[EMAIL PROTECTED]".

This message contains information that may be privileged or confidential and
is the property of the Capgemini Group. It is intended only for the person
to whom it is addressed. If you are not the intended recipient,  you are not
authorized to read, print, retain, copy, disseminate,  distribute, or use
this message or any part thereof. If you receive this  message in error,
please notify the sender immediately and delete all  copies of this message.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to