Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call an Oracle Stored Procedure From a Javascript Function

Status
Not open for further replies.

getjbb

MIS
Jun 4, 2003
139
US
Sorry forgot a Subject...

I am not no sure this is the correct forum to be asking this question or should it be asked in the Oracle forum since it relates to htp.p but....

I am trying to pass an array from a JavaScript function to an Oracle stored procedure:

var g_check_ids = ;
var g_on_off = ;b]
-----------------------

function is_checked()
{
for (var k in g_check_ids)
{
var the_check = document.getElementById("p_check" + g_check_ids);
if (the_check.checked)
{
the_check.value="1";
g_on_off="on";
}
else
{
the_check.value="0";
g_on_off="off";
}
}
document.getElementById("p_prodArray").value = g_on_off;
}
-------------

The array is called, g_on_off, and I am passing it to the procedure, get_array (below), as a hidden value by element id:

htp.p('<INPUT TYPE=HIDDEN NAME="p_prodArray" ID="p_prodArray" VALUE="">');

-----------
For my procedure I created a type:
TYPE varchar2_tabtype IS TABLE OF VARCHAR2(2000) INDEX BY BINARY_INTEGER;

And I set my parameter as:

PROCEDURE get_array (
p_prodArray IN varchar2_tabtype
);


I am getting the error:
Unexpected parameter datatype.

getjbb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top