All pastes #425830 Raw Edit

Someone

public php v1 · immutable
·published 2007-04-05 19:08 UTC
rendered paste body
//this is the ajax handler..//I'd like to pass the form's POST variables, through - //only explicit GET is working..any clues?  function makerequest(serverPage, objID) {    var obj = document.getElementById(objID);    //xmlhttp.open("GET", serverPage);    xmlhttp.open("POST", serverPage);    xmlhttp.onreadystatechange = function() {      if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {        obj.innerHTML = xmlhttp.responseText;      }    }    xmlhttp.send(null);  }  function makerequest2(serverPage, objID) {    var obj = document.getElementById(objID);    //xmlhttp.open("GET", serverPage);    xmlhttp.open("POST", serverPage);    xmlhttp.onreadystatechange = function() {      if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {        obj.innerHTML = xmlhttp.responseText;      }    }    //xmlhttp.send(null);    xmlhttp.send("?list_departments="+document.getElementsByName("list_departments")[].value);  }//this is the request in the main page..  <td>        <form method="post" name="form1" action="<? echo $path ?>" style="margin-bottom:0;">          <input type="hidden" name="list_departments" value="1">          <input type="image" src="/feathersoft/images/list.png" alt="List" border="0"' ;?> onclick="makerequest('departments.php', 'hw');  return false;" <?echo '/>        </form>      </td>