Posted Yesterday, 12:52 PM Hi, I am creating menu using jquery-mega-drop-down-menu-plugin. I am stroing menu items in database and want to create html sturcture dynamically by looping over resultset I have attached working example. Following html need to create dynamically. [COLOR=#000088]<li><a[/COLOR][COLOR=#660066]href[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"#"[/COLOR][COLOR=#000088]>[/COLOR][COLOR=#000000]Home[/COLOR][COLOR=#000088]</a></li>[/COLOR][COLOR=#000000] [/COLOR][COLOR=#000088]<li><a[/COLOR][COLOR=#660066]href[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"#"[/COLOR][COLOR=#000088]>[/COLOR][COLOR=#000000]About Us[/COLOR][COLOR=#000088]</a>[/COLOR][COLOR=#000000] [/COLOR][COLOR=#000088]<ul>[/COLOR][COLOR=#000000] [/COLOR][COLOR=#000088]<li><a[/COLOR][COLOR=#660066]href[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"#"[/COLOR][COLOR=#000088]>[/COLOR][COLOR=#000000]Menu Item 1[/COLOR][COLOR=#000088]</a></li>[/COLOR][COLOR=#000000] [/COLOR][COLOR=#000088]<li><a[/COLOR][COLOR=#660066]href[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"#"[/COLOR][COLOR=#000088]>[/COLOR][COLOR=#000000]Menu Item 2[/COLOR][COLOR=#000088]</a></li>[/COLOR][COLOR=#000000] [/COLOR][COLOR=#000088]</ul>[/COLOR][COLOR=#000000] [/COLOR][COLOR=#000088]</li>[/COLOR][COLOR=#000000] [/COLOR][COLOR=#000088]<li><a[/COLOR][COLOR=#660066]href[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"#"[/COLOR][COLOR=#000088]>[/COLOR][COLOR=#000000]Services[/COLOR][COLOR=#000088]</a></li>[/COLOR][COLOR=#000000] [/COLOR][COLOR=#000088]<li><a[/COLOR][COLOR=#660066]href[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"#"[/COLOR][COLOR=#000088]>[/COLOR][COLOR=#000000]Contact us[/COLOR][COLOR=#000088]</a></li> [/COLOR] Code (markup): Database Table for menu items as follow [COLOR=#000000]CREATE TABLE [/COLOR][COLOR=#008800]`headermenu`[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000000] [/COLOR][COLOR=#008800]`id`[/COLOR][COLOR=#000088]int[/COLOR][COLOR=#666600]([/COLOR][COLOR=#006666]11[/COLOR][COLOR=#666600])[/COLOR][COLOR=#000000] NOT NULL AUTO_INCREMENT[/COLOR][COLOR=#666600],[/COLOR][COLOR=#000000] [/COLOR][COLOR=#008800]`text`[/COLOR][COLOR=#000000] varchar[/COLOR][COLOR=#666600]([/COLOR][COLOR=#006666]300[/COLOR][COLOR=#666600])[/COLOR][COLOR=#000000] DEFAULT NULL[/COLOR][COLOR=#666600],[/COLOR][COLOR=#000000] [/COLOR][COLOR=#008800]`parentid`[/COLOR][COLOR=#000088]int[/COLOR][COLOR=#666600]([/COLOR][COLOR=#006666]11[/COLOR][COLOR=#666600])[/COLOR][COLOR=#000000] DEFAULT NULL[/COLOR][COLOR=#666600],[/COLOR][COLOR=#000000] PRIMARY KEY [/COLOR][COLOR=#666600]([/COLOR][COLOR=#008800]`id`[/COLOR][COLOR=#666600])[/COLOR][COLOR=#000000] [/COLOR][COLOR=#666600])[/COLOR][COLOR=#000000] ENGINE[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#660066]InnoDB[/COLOR][COLOR=#000000] DEFAULT CHARSET[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000]latin1[/COLOR] Code (markup): Any solution? Thanks for time and efforts in advance. - Thanks Zohaib.Attached Files
I THINK OP's asking to do it in DHTML, when really this is more PHP or ASP's kind of job. But yeah, having trouble finding an actual question in there... I see the obvious mistake of pissing all over one's own website with jquery and some fat bloated rubbish "accessibility and graceful degradation, what's that" animated crap built with it... but not really seeing a question.
As deathshadow said, a dynamic site (as opposed to dynamic HTML, which is a different thing) is done on the server, in ASP or (preferably) PHP (or Cold Fusion if you want to get jobs most people can't get). Since there's no way HTML can access the database (HTML is in the browser, the database is on the server), there's no way to make HTML use data from the database by itself, plain HTML or dynamic HTML.