I want to display a data table when i click a button in the same php page. The button is used in a form with other inputs such as some text. The data table is hide by default. And it get the values from the form, and then make a query in database and display them in it.
How can i achieve the function of display/hide ?
Do you have any solutions?
Thanks.
its a simple ajax issue, you can use any popular java script library to achieve this functionality to perform ajax calls and show/hide table.
for example, you can use jquery’s ajax functionality to get the data from the server and then
use jquery’s built in effects to show the table enclosed in div. For example, to display the content in the div ‘mydiv’, simply write
$("#mydiv").show();And to hide the content, write$("#mydiv").hide();