usman07 Posted April 27, 2012 Share Posted April 27, 2012 Is Javascript used to create this type is feature? how difficult is it to create this sort of feature? On this image, where it says 'filter your results' if a user clicks 'Detached Houses' then only detached houses will be displayed. if a user clicks 'Semi-detached' then only semi detached houses will be shown. Whats the technical term for this type of feature, and can you point me towards any tutorials etc, would really appreciate it. thank you! This what I have so far and im told this code can create this type of feature, but i really dont have a clue. <script type="text/javascript"> var properties = {$properties_json}; // very simple getter method that uses a single key-value pair. var selectProperties(k, v) { var rv = []; for (var i in properties) { if (properties[i][k] == v) { rv.push(properties[i]); } } return rv; } // selectProperties() </script> Quote Link to comment https://forums.phpfreaks.com/topic/261716-what-is-the-technical-term-for-this-feature/ Share on other sites More sharing options...
Adam Posted April 27, 2012 Share Posted April 27, 2012 We need a better understanding of what's happening currently. Can your server handle serving the results filtered and paginated already, or are you just working from some static HTML? I.e. have you already programmed the search engine in PHP or are you asking literally what needs to be done to have filters? Quote Link to comment https://forums.phpfreaks.com/topic/261716-what-is-the-technical-term-for-this-feature/#findComment-1341141 Share on other sites More sharing options...
usman07 Posted April 27, 2012 Author Share Posted April 27, 2012 I have HTML at the moment I havent inserted any PHP at the moment, but yeah Im asking what needs to be done to have filters?thanks Quote Link to comment https://forums.phpfreaks.com/topic/261716-what-is-the-technical-term-for-this-feature/#findComment-1341150 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.