Javascript Array

Hi All,

Just want to ask for some assistance with regards to Javascript…this is the scenario…

I have a form which contains a multi-value field… the values are generated by an agent…in the form there is a button that is suppose to open a another form…i need to pass the values of this multi-value field into a field in the other for me to create a list from where the users can select an item…

since I’m quite new in using javascript i need to know how I can pass the values of the multi-value fields into the other form…

I hope somebody can help…would really appreciate your help…thanks

Florisa

Subject: Javascript Array

The values of Domino multi-value fields are usually served up to the browser seperated by commas, or whatever the default separator is for the field, not as an array. To capture this data you just get the value for the field. To send it to another form, pass the field value via the URL call for that form.

Here’s how.

If the multivalue field is editable then in the button that calls the other form:

var form = window.document.forms[0];

var listValue = “&ListValue=” + (form.yourMultivalueListFieldName.value);

var formURL = yourFormURL + listValue ;

then launch formURL

If the multivalue field is not editable then add pass-thru html to the bottom of your form, hide it from Notes and code it as follows:

highlight comptext and then create computed text whose formula is the name of your multivalue field.

In the form you are opening:

Create a field called Query_String_Decoded (computed for display, with formula Query_String_Decoded).

In your field that will capture the selections for the list write the following formula:

separator := “the separator you use for your multivalue field in the other form”

urlSelectionList := @Middle(Query_String_Decoded; “&ListValue=” ; “&”) ;

@Explode(urlSelectionList; separator)

That should do it.

Subject: RE: Javascript Array

Thanks Paul!