mrclark219 Posted August 24, 2009 Share Posted August 24, 2009 OK so I created this table pulling data from my mysql database. But since the database is very large it pulls a bunch of data making an already cluttered page even worse. My question is, is there a way using php or any other languages that would work well together that I can create a show/hide button that would hide this table until someone needed it! Please someone help me out! Thanks for the time, and here is the coding for the table... $xmlDoc->addTable($stock->addRelation('purchaseOrders')->getData(array('purchaseOrders.dbPurchaseOrderNumber', 'purchaseOrders.dbPurchaseDate', 'purchaseOrders.dbReceived', 'purchaseOrderParts.dbQuantity'), NO_PRIMARY_KEY,'purchaseOrderParts.dbPartNumber="' . $partNumber . '" ORDER BY purchaseOrders.dbPurchaseDate DESC LIMIT 10'), CONTENT_NODE, array('TABLE'=>array('SHOW_HEADER'=>'1', 'LABEL'=>'Purchase Orders'))); if(!$stock->addRelation('purchaseOrders')->numRows) $xmlDoc->addData('No results found', $dataTag); $xmlDoc->addTag('HR', $hrTag); Quote Link to comment https://forums.phpfreaks.com/topic/171679-i-need-help-with-this-please/ Share on other sites More sharing options...
TeNDoLLA Posted August 24, 2009 Share Posted August 24, 2009 You could add a class in that table and use javascript to create the show/hide effect. Quote Link to comment https://forums.phpfreaks.com/topic/171679-i-need-help-with-this-please/#findComment-905264 Share on other sites More sharing options...
mikesta707 Posted August 24, 2009 Share Posted August 24, 2009 javascript... ahh, beat me too it. Quote Link to comment https://forums.phpfreaks.com/topic/171679-i-need-help-with-this-please/#findComment-905265 Share on other sites More sharing options...
p2grace Posted August 24, 2009 Share Posted August 24, 2009 jqueryui would be a really easy and stylish implementation. http://www.jqueryui.com/demos/show/ Quote Link to comment https://forums.phpfreaks.com/topic/171679-i-need-help-with-this-please/#findComment-905283 Share on other sites More sharing options...
TeNDoLLA Posted August 24, 2009 Share Posted August 24, 2009 I would give my vote also to jQuery. There is no really point to re-invent the wheel again once there is already a liblrary that offers same functionality and much more. Unless you want to know how. Quote Link to comment https://forums.phpfreaks.com/topic/171679-i-need-help-with-this-please/#findComment-905297 Share on other sites More sharing options...
mrclark219 Posted August 24, 2009 Author Share Posted August 24, 2009 At this point I just want it done, so that I can move, but I find myself stuck right here where I am...I'm relatively new to php, and I have kind of just been learning as I go along, but this one has me completely stumped and the way u guys are talking it seems relatively easy...I just cant figure it out! Quote Link to comment https://forums.phpfreaks.com/topic/171679-i-need-help-with-this-please/#findComment-905307 Share on other sites More sharing options...
mrclark219 Posted August 24, 2009 Author Share Posted August 24, 2009 I would really love an example of this if anyone has the time? Quote Link to comment https://forums.phpfreaks.com/topic/171679-i-need-help-with-this-please/#findComment-905309 Share on other sites More sharing options...
mikesta707 Posted August 24, 2009 Share Posted August 24, 2009 there are probably examples on the website. However, this is not PHP, but rather is javascript. here is a page with some tutorials on jquery http://docs.jquery.com/Tutorials Quote Link to comment https://forums.phpfreaks.com/topic/171679-i-need-help-with-this-please/#findComment-905314 Share on other sites More sharing options...
mrclark219 Posted August 25, 2009 Author Share Posted August 25, 2009 I still haven't gotten this resolved I tried using the advice given here, but nothing happened..Any more suggestions, Im totally lost now! Quote Link to comment https://forums.phpfreaks.com/topic/171679-i-need-help-with-this-please/#findComment-906021 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.