javascript - Trigger a PHP function on drop down change -
i trying create web site table of results have drop down box @ end of each row let select quantity of row. in case user have thousands of results based on search criteria possibly large , variable amount of results on page @ 1 time.
i want use onchange
or similar method update each change in background (update query table) without reloading page. no other information on page change , unnecessary delay user reload page, pulls tables mean.
i have been searching net several days now, , figured out how information extracted on drop down changed , changed in javascript.
i haven't found how trigger update sql command without reloading page. can please tell me how variables extracted sql update without reloading page?
here have far. appreciated.
function quantityfunction(select) { var selectedoption = select.options[select.selectedindex]; alert (\"the selected option \" + selectedoption.value); }//alert testing </script> <?php echo"<select onchange=\"quantityfunction(this)\">"; while($temp<101) { echo"<option value='$item-$temp'>$temp"; $temp++; } </select> ?>
Comments
Post a Comment