Format SQL Query Result into web menu

Posted by highwingers on Stack Overflow See other posts from Stack Overflow or by highwingers
Published on 2012-09-06T06:23:15Z Indexed on 2012/09/07 21:38 UTC
Read the original article Hit count: 220

Filed under:
|
|

I am trying to bhuild a drill down menu for my website, where user will click on a category and it will show the subcategories of that clicked category, there could be n-levels. I am able to write sql query which returns the output exactaly as I want, but the problem is...I dont want to show the whole menu to end user, I would like to open/expand only clicked category.

    my Query output is:

1 IPTV
2      Jadoo Tv
3      Shava Tv
4      Jalva Tv
5 Programming
6      Microsoft
7           Asp.Net
8      PHP

so by default IPTV & Programming Should be displayed, since they are parent, and when I click on IPTV it should open the children of IPTV, like I said there could be n-levels.

I was thinking, I can load the output of query to webpage and then control the menu navigation with css/javascript.

do you guys have any ideas?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about ASP.NET