Accessing form Element with spaces as part of the Element name
|Date:||11 October 2004|
|Product/Release:||LANSA for the Web|
|Abstract:||Accessing form Element with spaces as part of the name|
|Submitted By:||LANSA Technical Support|
|Last Review:||November 2010|
To allow value retrieval from a field and be able to place values in it without needing to rename the field as 9 characters or remove the spaces after the field name. This method can also be used in fields in browselists.
Instead of using:
document.form name>.<element name>.value
there is a simpler method:
document.forms['<form name>']['<element name>'].value
These examples use field names with spaces around the field name, i.e. "LANSA FIELD NAME ". They retrieve and place values using the new techniques.