phpfreakjav Posted September 25, 2008 Share Posted September 25, 2008 Hello, I hope somebody is able to point me in the right direction. I need to make an adaptive html table. When the user selects from an html form drop down menu a category only that category is displayed in the html table. How do I accomplish that? Link to comment https://forums.phpfreaks.com/topic/125711-adaptive-html-table/ Share on other sites More sharing options...
AndyB Posted September 25, 2008 Share Posted September 25, 2008 Rather a vague question as there's not enough context. If your content comes from a database, a query like ... WHERE category = 'the selected category' is probably a good first step. Link to comment https://forums.phpfreaks.com/topic/125711-adaptive-html-table/#findComment-650047 Share on other sites More sharing options...
haku Posted September 25, 2008 Share Posted September 25, 2008 This is done with javascript. Link to comment https://forums.phpfreaks.com/topic/125711-adaptive-html-table/#findComment-650419 Share on other sites More sharing options...
sKunKbad Posted September 25, 2008 Share Posted September 25, 2008 You should try the javascript forum Link to comment https://forums.phpfreaks.com/topic/125711-adaptive-html-table/#findComment-650849 Share on other sites More sharing options...
phpfreakjav Posted September 26, 2008 Author Share Posted September 26, 2008 <table width="200" border="1"> <tr> <th scope="col">Category 1 </th> <th scope="col">Category 2</th> </tr> <tr> <td scope="data_1">Item 1</th> <td scope="data_2">Item 1</th> </tr> </table> <form id="options_pane" name="option_pane" method="post" action=""> <label> <select name="options" id="options"> <option>Display All Data</option> <option>Display Category 1</option> <option> Display Category 2</option> </select> </label> </form> What I need. 1. A user is in a website. He click on display category 1 link. When the user enters the website only that category_1 shows in the table but category 2 is not present. When the user selects Display All data both columns are shown. Link to comment https://forums.phpfreaks.com/topic/125711-adaptive-html-table/#findComment-651471 Share on other sites More sharing options...
haku Posted September 27, 2008 Share Posted September 27, 2008 As I already said: This is done with javascript. And as sKunKbad added: You should try the javascript forum Link to comment https://forums.phpfreaks.com/topic/125711-adaptive-html-table/#findComment-651692 Share on other sites More sharing options...
phpfreakjav Posted December 17, 2008 Author Share Posted December 17, 2008 here is how I did it with php no javascript http://www.calstatela.edu/academic/aa/ess/elps/newweb/elpsworkshop_schedule.php?value=All I pass by value and if statements select the correct information. Show workshops: All | Tools for Teaching | ATI | WebCT | Web Development Link to comment https://forums.phpfreaks.com/topic/125711-adaptive-html-table/#findComment-717247 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.