Hi everybody newbie here need help from all the master

I want to make loading status using combobox onchange

i have code like this

        <table>
                <th>Filter By test</th>
                <tr><td>Contact</td>
                <td><select name="dropdown" id="dropdown"onchange="showUser(this.value)">
                        <option></option>
                        <option value="0">All</option>
                        <option value="1">Support</option>
                        <option value="2">Software Development</option>
                        <option value="3">Software Consultant</option>
                    </select>
                </td></tr>
        </table>
    </form>
    <div class="clr-div"></div>
    <div id="result">
        <?php 


        $this->load->view('table_ticket_admin'); 

        ?>
    </div>
</div>

<script type="text/javascript">
function showUser(str)
{
    if (str=="")
      {
      document.getElementById("result").innerHTML="";
      return;
      } 
    if (window.XMLHttpRequest)
      {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
      }
    else
      {// code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    xmlhttp.onreadystatechange=function()
      {
      if (xmlhttp.readyState==4 && xmlhttp.status==200)
        {
        document.getElementById("result").innerHTML=xmlhttp.responseText;
        }
      }
    xmlhttp.open("GET","home/search/"+str,true);
    xmlhttp.send();
 }
</script>

:-/ what is the problem you are facing?

I assume home/search/1 is mod_rewite for a php page?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.