You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by marwansalam <ma...@yahoo.com> on 2003/04/21 18:54:47 UTC

JavaScript and ActionForm

Hi,

Is there a way to use nested objects in ActionForms with JavaScript? 

I have an ActionForm whose one of its attributes is an object. In 
JSP, I access the attribute as follows:
<html:text property="orderModel.shipToCity"/>.

In JavaScript when I try to call myForm.orderModel.shipToCity.value 
= "test", it complains as follows: "Error: 'orderModel' is null or 
not an object". It seems that JavaScript is not understanding the 
Struts ActionForm's nested object capability.

Does anyone has a workaround that problem beside renaming my 
attributes in my ActionForm?

Marwan


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org