struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Namasivayam, Sudhakar (Cognizant)" <NSudha...@chn.cognizant.com>
Subject Form submission - Array of hidden fields with large values...
Date Fri, 02 Apr 2004 11:28:43 GMT
Hi,
   I have a page in which i need to update a "TEXTAREA" when a combo value is changed. 

Previoiusly i populated a array to have the test for each combo value.

var desc = new Array(
<logic:iterate name="desc" id="b">
        <%if(icount!=0){%>,<%}%>
        "<bean:write name="b"/>"       
        <%icount++;%>
</logic:iterate>
);

Now if there was any "enter" character then i get a java script error(unterminated string
constant). Now i modified my code to...
<html:form>
..
..
..
        <input type="hidden" name="desc" value = "">
        <logic:iterate name="desc" id="c">
                <input type="hidden" name="desc" value = "<bean:write name="c"/>"
>
        </logic:iterate>
</html:form>

btw..
the java script function goes like this ...

         iIndex = document.forms[0].combo.selectedIndex;
        document.forms[0].textarea1.value= document.forms[0].desc[iIndex+1].value;

But these values need not be posted on the form submission. Will this cause any problem(Large
data)?? Any other simple solution???


Thank you very much,

sudhakar

PS :I have not used <html:hidden /> 


Mime
View raw message