I am developing an eshop and the client wants ajax. I think that this is a bad idea because its going be slow.
However while viewing the products there are some filters on the left. When a user selects a filter some other should be disabled.
For example there may be jackets for both males and female, but the red colour is only available for females, so when the user clicks male, the red filter should be disabled.
I am wondering which is the best way to achieve this. I would not use ajax for this just load all the products of the category and filter them with Javascript but I can't because I must use ajax.
So should I make a separate call like .getJson('filters.php.....', currentFilters, callback)
? and then decide which filters will be disabled? (This requires executing more queries at the database)
Or is it possible to include in the results page something like this:
<script type=text/javascript>
var data={jsondatagoeshere};
</script>
I wonder whether all browsers will execute this code. Any other suggestion?