gigabyt3r Posted July 3, 2009 Share Posted July 3, 2009 I have a list of vehicles at an address called ford-transit-vans.php, and the vehicles are sorted by registration year, but I was wondering how can I add another sort option that re-orders the results on the page but doesn't have to be directed to another page but im not sure how to go about doing it Any help would be greatly appreciated Thanks Quote Link to comment Share on other sites More sharing options...
trq Posted July 3, 2009 Share Posted July 3, 2009 You would use javascript, not php. Quote Link to comment Share on other sites More sharing options...
SetToLoki Posted July 3, 2009 Share Posted July 3, 2009 I have a list of vehicles at an address called ford-transit-vans.php, and the vehicles are sorted by registration year, but I was wondering how can I add another sort option that re-orders the results on the page but doesn't have to be directed to another page but im not sure how to go about doing it Any help would be greatly appreciated Thanks look up AJAX there is many a tutorial out there for it, it's a javascript based way of doing what you want, and alot more. It is very powerfull, you can tell the javascript to load info from a seperate php page without realoding the page Quote Link to comment Share on other sites More sharing options...
trq Posted July 3, 2009 Share Posted July 3, 2009 You definitely don't need ajax for this, if you can simply want to reorder the results already on the page. Quote Link to comment Share on other sites More sharing options...
gigabyt3r Posted July 3, 2009 Author Share Posted July 3, 2009 I don't know Javascript or AJAX at the moment, which one would be easier and quicker for me to learn? Quote Link to comment Share on other sites More sharing options...
trq Posted July 3, 2009 Share Posted July 3, 2009 Ajax is a methodology, not a language. You need to know Javascript and a server side language (such as php) to implement Ajax. Id' suggest you at least learn some Javascript basics and then take a look at a framework like jQuery. It makes light work of alot of common Javascript requirements. Quote Link to comment Share on other sites More sharing options...
gigabyt3r Posted July 3, 2009 Author Share Posted July 3, 2009 I've read up on JavaScript on w3schools, but I'm still not sure what would be best to do to in my situation (which is wanting to filter results within a search query) If someone could point me in the right direction it would be greatly appreciated. If you need anymore information don't hesitate to ask. Thanks in advance Quote Link to comment Share on other sites More sharing options...
trq Posted July 4, 2009 Share Posted July 4, 2009 Take a look at jQuery's sortable plugin. Quote Link to comment Share on other sites More sharing options...
npsari Posted July 4, 2009 Share Posted July 4, 2009 hmm, what about using an Iframe? You can use an Iframe (but dont give it borders so people cant see it) But be careful, because some browsers disable Iframes, so u will propably upset some users Quote Link to comment Share on other sites More sharing options...
gigabyt3r Posted July 6, 2009 Author Share Posted July 6, 2009 How can I get a dropdown box to load a page in the iFrame? Quote Link to comment Share on other sites More sharing options...
gigabyt3r Posted July 7, 2009 Author Share Posted July 7, 2009 Bump Quote Link to comment Share on other sites More sharing options...
gigabyt3r Posted July 7, 2009 Author Share Posted July 7, 2009 So I need about 6 different pages to load in the iframe, called ford-transits-reg-year.php, ford-transits-color.php, ford-transit-roof-height,php etc? Is there a simpler way to do it? Because not only do I want to re-arrage the results I also want to filter out specific keywords. Thanks in advance Quote Link to comment Share on other sites More sharing options...
gigabyt3r Posted July 7, 2009 Author Share Posted July 7, 2009 If that doesn't make sense just say and I will try to explain it better. Quote Link to comment Share on other sites More sharing options...
trq Posted July 7, 2009 Share Posted July 7, 2009 I'm really not sure what an iframe has to do with your question, yet I pointed you to a solution many posts ago. Quote Link to comment Share on other sites More sharing options...
joel24 Posted July 7, 2009 Share Posted July 7, 2009 iframe's would take almost as much time as re-loading the entire page, and will require unnecessary PHP/MySQL calls when you can do it all instantly with jquery/javascript.... try this jquery plugin... its pretty simple you should get the hang of it http://tablesorter.com/docs/ Quote Link to comment 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.