Jump to content

Recommended Posts

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>

post-130660-13482403469082_thumb.png

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?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.