File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic

String array in form

 
basha khan
Ranch Hand
Posts: 516
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
I have an ActionForm in struts-config for eg,

<form-bean name="SomeForm" >
<form-property name="stringsSelected" type="java.lang.String[]" />
</form-bean>

In JSP, i am creating a hidden field for this property like,

<html:hidden property = "stringsSelected"/>

Now i want to to pass a javascript string array using this form property fuch as

<script type="javascript">

function aFunct(){

document.forms[0].stringsSelected.value = myJSStringArray;

//OR

document.forms[0].stringsSelected = myJSStringArray;

}
</script>

If property stringsSelected is a string instead of string [] it works, for String array it does'nt.

Is there any way to send a javascript arry to server using forms?.

Thanks,
Basha
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64205
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not cross-post the same question in more than one forum.
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic