Re: Help! OWS21 javascript arrays > PL/SQL arrays

From: Mark Madsen <mark.madsen_at_tswi.com>
Date: 1997/07/22
Message-ID: <5r3565$83$1_at_eros.clara.net>#1/1


 Bennie Johnson wrote in article <01bc9399$83845b20$51105193_at_dl660>...
>Does any know how you can assign a javascript array to a
>PL/SQL array (a field or group of fields that ORACLE would interpret
>as an array) using HTML/JAVASCRIPT and vice versa.

In order to pass an array to a procedure, you need to have an HTML field for each JS array element with the same name (for example, i_po_numbers). These fields will be put into the associated procedure parameter that needs to be a PL/SQL table (array).

Now for the tough part.

To pass the JS array to a procedure, you need the same number of fields in an HTML form. You could then transfer each JS array element to the corresponding form field value using JS when the user submits the form. If you don't want the user to see the values then use a hidden HTML field. This solution only works if the number of JS array elements are fixed. If they are dynamic, its a little more difficult but it could be done. You could create a hidden frame and write a new html document that just contained a form declaration, the fields from the original form and a form element for each JS array element. Once you have created the form, simply trigger the form submit.

If you are using IE 4.0 P2, DHTML can save you a lot of hassel and trouble, but it won't work in Netscape. :-(

Hope this helps,

Mark Madsen
mark.madsen_at_tswi.com Received on Tue Jul 22 1997 - 00:00:00 CEST

Original text of this message