aid

Thursday, 28 August 2014

how to send communicate with multiple value using ajax.

how to send communicate  with multiple value using ajax.
<script>
 function getsearch()
     {
    var city=document.getElementById('city').value;
    var skils=document.getElementById('skils').value;
    var str=document.getElementById('txtsearch').value;
      window.XMLHttpRequest
          xmlhttp=new XMLHttpRequest();
          xmlhttp.onreadystatechange=function()
                {
                     if (xmlhttp.readyState==4 && xmlhttp.status==200)
                          {
                                document.getElementById("get").innerHTML=xmlhttp.responseText;
                         
                        }
                }
         xmlhttp.open("GET","../include/cat_searching.php?str="+str+"&city"+"&skils",true);
         xmlhttp.send();
     }

</script>

<table id="search_table">
    <tr>
        <td>
        <input name="city" id="city">
        </td>
        <td><input type="text" placeholder="select skills" name="skils" id="skils"/></td>
        <td><input type="text" id="txtsearch" placeholder="select date like 2014-08-28" ></td>
        <td><input type="button" id="btnsearch_enq" value="SEARCH"  style="padding:0px; margin-top:-7px;" onClick="getsearch();"></td>
    </tr>
</table>

No comments:

Post a Comment