array from pop-up to form

G

Guest

I have this pop-up window with a calendar and a listbox

all the dates i selected appear in this listbox, and are put in an array
How can i pass this array from this pop-up to the main form
anyone ?
 
G

Guest

How did you create the popup window?

You could directly access the opener window's form fields, but I believe it
is better to call a Javascript function in the opener window, and pass all
your data directly to it. Somthing like:

<script language="JavaScript"><!--
window.opener.functionname( yourarray);
//--></script>

Use the function "functionname" to update your formfield(s) in the opener
window.

Kind regards,

Mihcel
 
B

bruce barker

this will work, but you must be aware of variable lifespan. if you pass an
array to opener, the array is still destroyed on window close (and will
become null in the caller). to avoid this, the function you call should
create a clone of the array and its contents.

-- bruce (sqlwork.com)


| How did you create the popup window?
|
| You could directly access the opener window's form fields, but I believe
it
| is better to call a Javascript function in the opener window, and pass all
| your data directly to it. Somthing like:
|
| <script language="JavaScript"><!--
| window.opener.functionname( yourarray);
| //--></script>
|
| Use the function "functionname" to update your formfield(s) in the opener
| window.
|
| Kind regards,
|
| Mihcel
|
| "Boonaap" wrote:
|
| > I have this pop-up window with a calendar and a listbox
| >
| > all the dates i selected appear in this listbox, and are put in an array
| > How can i pass this array from this pop-up to the main form
| > anyone ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top