将Array作为PLSQL过程的对象传递

时间:2017-02-21 09:29:03

标签: javascript arrays ajax oracle stored-procedures

我需要在JavaScript中生成数组并创建我们发送到plsql过程的该数组的对象。谁能告诉我如何实现这个目标?

function add_array(theForm){
  var myArray=new Array()
  for (var i=0;i < theForm.Selected.length; i++)
  {
    if(theForm.Selected[i].checked) {
      something like this for generating array 
      myArray[] = theForm.Selected[i].value;
    }
  }

如何在AJAX中创建数组对象并将该对象传递给下面的URL?

  var url = "search_pkg.save_items?vitems";
  var urlParams = "";
  var urlParams1 = "";
  var xmlhttp = js_getXMLHTTPRequest();
  var xmlContentType = "application/x-www-form-urlencoded";
  urlParams1 =arrayobject;
  urlParams = urlParams1;
  xmlhttp.open("POST", url, false);
  xmlhttp.setRequestHeader("Content-Type", xmlContentType);
  xmlhttp.send(urlParams);
  theForm.action = ("search_pkg.check_out?vitems="+xmlhttp.responseText);
  vCheckedCount =vCheckedCount +1;
  theForm.submit();
}

0 个答案:

没有答案