struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Barrows" <jbarr...@sssc.com>
Subject RE: Javascript question re: dynamically generated input type='text' controls
Date Fri, 13 Aug 2004 19:33:03 GMT


> -----Original Message-----
> From: Christina Siena [mailto:csiena@mountaincable.net]
> Sent: Friday, August 13, 2004 11:23 AM
> To: user@struts.apache.org
> Subject: Javascript question re: dynamically generated input 
> type='text'
> controls
> 
> 
> Hi,
> 
> I am developing a page containing dynamically generated input
> type="text" controls where their names consist of multiple composite
> keys. The name of the input type="text" controls, however, can not be
> referenced correctly using javascript. For example, I have the
> following html input tag:
> 
> <input type="text" size="1"
> name="value(number=1480;countryCode=USA;templateNumber=79999;t
ypeCode=STAGE;languageCode=EN;idTypeCode=MODE:::::)"
> value="" disabled="true" class="disabledText"
> onchange="benefitsChanged();" />
> 
> The following javascript won't work because the control name 
> contains =
> and ; and : as follows:
> 
> document.formname.number=1480;countryCode=USA;templateNumber=7
9999;typeCode=STAGE;languageCode=EN;idTypeCode=MODE:::::.value
> = "";
> 
> I only have one other idea how to solve this problem. Instead 
> of control
> names containing the multiple composite keys, instead use a 
> simple valid
> name. In the action, map the valid name to the multiple 
> composite keys.
> Does
> anyone have any other ideas how to solve this?

Ummmmm.... hidden fields in the form?


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


Mime
View raw message