tags:

views:

23

answers:

1

can we pass an array to window.openDialog or window.open in javascript?

I know that we can pass parameters, but can this be an array?

A: 

yes we can ...

...window.openDialog is an extension to window.open. It behaves the same, except that it can optionally take one or more parameters past windowFeatures, and windowFeatures itself is treated a little differently.

The optional parameters, if present, will be bundled up in a JavaScript Array object and added to the newly created window as a property named window.arguments. They may be referenced in the JavaScript of the window at any time, including during the execution of a load handler. These parameters may be used, then, to pass arguments to and from the dialog window.

luca
so you mean if ppl is an array, i can pass it to the window as window.openDialog("url here","name","features",ppl);?inside the window window.arguments[0]=ppl......so how do i access the individual elements of my array?
Neethusha
var thearray=window.arguments[0]var elem1=thearray[0]
luca