Hi:
My <html:form> tag doesn't allow me to skip an 'action' attribue.   If you
look at my code below, I move the assignment of the 'form action'  to the
javascript function so which action to take is dynamically depends on the
form element 'whichAction'.  But the compiler insist I have to have the
'action' property right inside the <html:form> tag.  But that doesn't allow
me to choose the action dynamically.   Does anyone have any suggestion?

<script language = "Javascript">
function submitForm(frm)
{
   var whichAction=frm.elements("whichAction")

   if (whichAction == "create")
   {
      document.theForm.action =
"/app/fdd/shopWorkOrder/fromCreateShopWorkOrder;
   }
   else
   {
      document.theForm.action =
"/app/fdd/shopWorkOrder/fromUpdateShopWorkOrder;
   }

   return true;
}
</script>


<jsp:useBean id="ShopWorkOrderBean" scope="request"
 
class="com.cat.sdl.fdd.formBean.shopWorkOrder.ShopWorkOrderForm"/>
<html:form name="theForm" method="post" onSubmit="return
submitForm(document.theForm)">


I got the following error with the above code:
Parsing of JSP File '/app/fdd/shopWorkOrder/CreateTLFPart.jsp' failed: 
/app/fdd/shopWorkOrder/CreateTLFPart.jsp(28): required attribute 'action'
not specified for tag 'form'
probably occurred due to an error in
/app/fdd/shopWorkOrder/CreateTLFPart.jsp line 28:
<html:form name="theForm" method="post" onSubmit="return
submitForm(document.theForm)">




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

Reply via email to