Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I too had the same trouble. But googling dint help.</p> <p>I tried myself to tweak and test. And I got it. I am using <code>POST</code> method though. Please try the idea with <code>GET</code> method. Here is the idea:</p> <p>Append the array index value within square brackets to the Post/Get variable name for array. Do this for each array element.</p> <p>The part <code>var parameters="&amp;Name[0]="+namevalue1+"&amp;Name[1]="+namevalue2;</code> of the following script would give you a hint. </p> <p>This is the test JS, I used (Again this uses <code>POST</code> method not <code>GET</code>):</p> <pre><code> var xmlAJAXObject; function test() { xmlAJAXObject=GetxmlAJAXObject(); if (xmlAJAXObject==null) { alert ("Oops!! Browser does not support HTTP Request."); return false; } var namevalue1=encodeURIComponent("Element 1"); var namevalue2=encodeURIComponent("Element 1"); var parameters="&amp;Name[0]="+namevalue1+"&amp;Name[1]="+namevalue2; xmlAJAXObject.open("POST", "test.php", true); xmlAJAXObject.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlAJAXObject.setRequestHeader("Content-length", parameters.length); xmlAJAXObject.onreadystatechange=stateChanged; xmlAJAXObject.send(parameters); } function stateChanged() { if (xmlAJAXObject.readyState ==4) { if (xmlAJAXObject.status == 200) { alert('Good Request is back'); document.getElementById("show").innerHTML=xmlAJAXObject.responseText; } } } function GetxmlAJAXObject() { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari return new XMLHttpRequest(); } if (window.ActiveXObject) { // code for IE6, IE5 return new ActiveXObject("Microsoft.Microsoft.XMLHTTP"); } return null; } </code></pre> <p>This worked for me. Sorry for the formatting and incomplete code. I meant to give a direction. Google reault websites couldn't give a solution. Hope you find this useful.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload