Hi Alex,

   Can you put a

   alert(workrequest.wrNumber.value);

   in  function doWRModify(wrNumber)

   after you assign the value to wrNumber?

   Is the form name, "workrequest" (View Source to check)?

   My JavaScript might be rusty but aren't all of the lines supposed to
start with "document"?

   ex:

     document.workrequest.wrNumber.value=wrNumber;
     document.workrequest.action="/wrModify.do";
     document.workrequest.submit();

Abraham

> -----Original Message-----
> From: Alex Colic [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 08, 2001 9:05 AM
> To: Struts
> Subject: why is this form not being properly submitted?
>
>
> Hi,
>
> I have a form with two buttons. If the user clicks one button the form is
> submitted via the standard action defined in the form tag. If it is the
> second button, I change the action and submit the form. The
> problem is that
> I have a text box on the form that when I check its value in the action
> servlet that parameter is not being passed. A snipped of my html
> page is as
> follows:
>
> <html:form method="POST" action="wrSearch" >
>     <TABLE name="tblModifyWRCriteria">
>     <TR>
>       <TD>
>           <bean:message key="prompt.wrNumber" />
>       </TD>
>       <TD>
>         <INPUT TYPE="text" ID="wrNumber" Name="wrNumber" SIZE=20>
>       </TD>
>       <TD>
>
> On the default button wrNumber is submitted to the action servlet
> but on the
> the second button I do the following:
>
> function doWRModify(wrNumber)
> {
>   workrequest.wrNumber.value=wrNumber;
>   workrequest.action="/wrModify.do";
>   workrequest.submit();
> }
>
> I set the value of the text box, then I reset the action then I submit the
> form. In the below case I get null returned:
>
>   String strWRNumber=request.getParameter("wrNumber");
>
>
> Regards
>
> Alex Colic, HBA, B. Ed
> PopWare Inc. "Driving down the cost of conversions!"
> E-Mail: [EMAIL PROTECTED]
> Tel: 1-905-777-8171 ext. 104
> Fax: 1-905-777-0132
>
>

Reply via email to