function stateSearch(){        
    var state = document.getElementById("state").value;
    console.log(state);
        if(state !== null){            
            $.ajax
                ({
                    type: 'GET',                        //Request Data Type
                    contentType: 'application/json',    //Request Content Type
                    url: url + state,          //RESTful Service URL
                    dataType: "json",                   //Response Data Type

                    success: function(data)
                    {
                        tableHeader();
                        outputCustRowsHtml(data);
                        document.write("</table>");
                        document.write("<br/><a href='search.html'>Search Criteria</a>");
                        document.write("<br/><a href='test.html'>Show All Customers</a>");
                    }
                });
    }   
}//end of state search
//Returns a table with the customers from the same state
Returns a table with the customers from the same state
Returns a table with the customers from the same state
function stateSearch(){        
    var state = document.getElementById("state").value;
    console.log(state);
        if(state !== null){            
            $.ajax
                ({
                    type: 'GET',                        
                    contentType: 'application/json',    
                    url: url + state,          
                    dataType: "json",                   
                    success: function(data)
                    {
                        tableHeader();
                        outputCustRowsHtml(data);
                        document.write("</table>");
                        document.write("<br/><a href='search.html'>Search Criteria</a>");
                        document.write("<br/><a href='test.html'>Show All Customers</a>");
                    }
                });
    }   
}
function stateSearch ( ) { var state = document . getElementById ( "state" ) . value ; console . log ( state ) ; if ( state !== null ) { $ . ajax ( { type : 'GET' , contentType : 'application/json' , url : url + state , dataType : "json" , success : function ( data ) { tableHeader ( ) ; outputCustRowsHtml ( data ) ; document . write ( "</table>" ) ; document . write ( "<br/><a href='search.html'>Search Criteria</a>" ) ; document . write ( "<br/><a href='test.html'>Show All Customers</a>" ) ; } } ) ; } }
Returns a table with the customers from the same state
Returns a table with the customers from the same state
//Request Data Type //Request Content Type //RESTful Service URL //Response Data Type //end of state search