I'm using jquery.ajax to submit data to a pl/sql package via url. I've done this by including the data as a parameter in the URL, however there are limits to the length of the data that can be sent this way.
The ajax function has a 'data' parameter, however I'm not sure how to get that from the package. where does that data "go"? is it on the server somewhere that the package can access?
var dataString = "some test data";
$.ajax
({
type: "POST"
, url: "http://www.myWebsite.com/myPackage$.insert_record?p_username=testUser&p_data="+dataString
, data: null //dataString
, complete: function(r)
{ alert(r.responseText); }
});
I've also played around with cookies:
document.cookie = "test_cookie="+ dataString;
...which I can retrieve from PL/SQL
declare
l_cookie OWA_COOKIE.COOKIE;
begin
l_cookie := OWA_COOKIE.GET('test_cookie');
...
But there are character limits on cookies as well, and not sure if it's appropriate to use them that way.
Please advise how to best handle this. Thanks!