Hello!!

I've asked about dynmic menus before..I received a link to a good dynamic menu.(Sliding menu)

But i want my menu to be created from a mysql database...

Something like this: Items with parentID=0 --> top level in menu
and so on..

I've tried for weeks..

Grateful for help..

Here is the script I started from, i have removed some code.


<script>
slideMenu = new createSlideMenu("slideMenu")

//Needed dummy classes
slideMenu.bgClass = "slideMenuBG"
slideMenu.txtClass = "slideMenuText"

slideMenu.level[1] = new slideMenu_makeLevel(10,130,20,2,"clSlideMenu1","clA1","level1_regular.gif","level1_round2.gif","level1_round.gif","level1_sub.gif", "level1_sub_round.gif")
slideMenu.level[2] = new slideMenu_makeLevel(20,120,18,2,"clSlideMenu2","clA2","level2_regular.gif","level2_round2.gif","level2_round.gif", "level2_sub.gif", "level2_sub_round.gif")
slideMenu.level[3] = new slideMenu_makeLevel(30,110,20,2,"clSlideMenu3","clA3","level3_regular.gif","level3_round2.gif","level3_round.gif","level3_sub.gif","level3_sub_round.gif")
slideMenu.level[4] = new slideMenu_makeLevel(40,100,19,2,"clSlideMenu4","clA4","level4_regular.gif", "level4_round2.gif","level4_round.gif","level4_sub.gif", "level4_sub_round.gif")


for(var i=0;i<slideMenu.level;i++){
var l = slideMenu.level[i]
new preLoadBackgrounds(l.regImage,l.roundImg,l.roundImg2,l.subImg,l.subRound)
}



//Menu 1
slideMenu.makeMenu('top','News')
slideMenu.makeMenu('sub','sub_0','')
slideMenu.makeMenu('sub2','sub2_1','')
slideMenu.makeMenu('sub3','sub3_0')
slideMenu.makeMenu('sub3','sub3_1')
slideMenu.makeMenu('sub4','sub4_0')
slideMenu.makeMenu('sub4','sub4_1')
slideMenu.makeMenu('sub4','sub4_2')
slideMenu.makeMenu('sub3','sub3_3')
slideMenu.makeMenu('sub4','sub4_0')
slideMenu.makeMenu('sub4','sub4_1')
slideMenu.makeMenu('sub4','sub4_2')
slideMenu.makeMenu('sub2','sub2_2')
slideMenu.makeMenu('sub2','sub2_3')
slideMenu.makeMenu('sub2','sub2_4')
slideMenu.makeMenu('sub3','sub3_0')
slideMenu.makeMenu('sub3','sub3_1')

slideMenu.makeMenu('sub','sub_1','')
slideMenu.makeMenu('sub','sub_2','')

slideMenu.makeMenu('sub','sub_3','')
slideMenu.makeMenu('sub','Categories')

slideMenu.makeMenu('top','Sport')

slideMenu.makeMenu('sub','New scripts','/script/search.asp?new=1')
slideMenu.makeMenu('sub','All scripts','/script/index.asp')
slideMenu.makeMenu('sub','Categories')

slideMenu.makeMenu('top','International')
slideMenu.makeMenu('sub','New scripts','/script/search.asp?new=1')
slideMenu.makeMenu('sub','All scripts','/script/index.asp')
slideMenu.makeMenu('sub','Categories')
slideMenu.makeMenu('top','Domestic')
slideMenu.makeMenu('sub','New scripts','')
slideMenu.makeMenu('sub2','Menu scripts','/script/search.asp?category=menu')
slideMenu.makeMenu('sub2','Text scripts','/script/search.asp?category=text')

slideMenu.init()

</script>