开发者

Filter multiple categories with a form

I’m about to develop an events board in Codeigniter, where each event has multiple categories. I’ve figured that i sh开发者_开发问答ould use a related table for events and categories, like described here: http://codeigniter.com/forums/viewthread/152795/

The real deal is that I would like to have a categories filter, much like the one in Authentic Jobs. Never mind the js goodness and animations, but I want to know the logic behind it.

  1. The hardest thing for me is the multiple checkboxes that filter the query. How should I approach this?
  2. Second, I guess the whole “preferences” are saved to a session, right? I wouldn’t use an URL for multiple categories.


Well, that site is all ajax.

When a category is checked/unchecked a click event is triggered. An ajax call is made and the results are updated.

It's got nothing to do with Codeigniter per se.

Click category
Send ajax request with categories data
Query database using categories in a where clause
Update results
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜