hi, How would i do a multi search on a db table? Let's say i have 6 dropdown menu's and on select the appropiate search value is triggered, but with the earlier select search term.??
sorry yes, well actual both. I am going to use php to parse the result. i really would like to use something like this http://www.w3schools.com/PHP/php_ajax_database.asp but then wit more dropdown's say search lastname search age search hometown
this isn't the mysql or php, but it is the javascript function for auto-generating a querystring for attaching to ajax querystring for the db call. <script> function generate_query(){ frm=document.forms["selform"]; qry="?runquery=1"; for(z=0;z<frm.elements.length;z++){ if(frm.elements[z].type=="select-one" && frm.elements[z].options.selectedIndex>0){ qry += "&" + frm.elements[z].name + "=" + frm.elements[z].options[frm.elements[z].options.selectedIndex].value; } } alert(qry); } </script> <form name="selform"> <select name="term_lastname" onchange="generate_query()"> <option value="">select last name</option> ......... </select> <select name="term_age" onchange="generate_query()"> <option value="">select age</option> <option value="a">s</option> ......... </select> <select name="term_hometown" onchange="generate_query()"> <option value="">select home town</option> <option value="xxx">aaa</option> ......... </select> </form> HTML:
@imvain, your suggestion help me out a lot but i am not there quit yet Do yo know of a solution for the following: I have a result page loaded with jquery/ajax in a div, when i clicked the details of one of the results i load the details in the div. But now when you hit the back button it doesn't go to the previous results?? kind regards
I'm not sure how to fix that, but it does seem to a common problem. I searched google for ajax back button and there are many results.