I'm trying to use ASP to create a dynamic a dynamic menu with javascript.
If I hard code the javascript it works fine but now I'm trying to get the results from a database but would like some help on the SQL statement.
Response.write "USETEXTLINKS = 1 //replace 0 with 1 for hyperlinks"
Response.write "// Decide if the tree is to start all open or just showing the root folders"
Response.write "STARTALLOPEN = 0 //replace 0 with 1 to show the whole tree"
Response.write "ICONPATH = '' //change if the gif's folder is a subfolder, for example: 'images/'"
'Root folder does not need to change
Response.write "foldersTree = gFld('<div class = 'personalnotes'>Continents</div>', '')"
'Should like the associated continent
Response.write " aux1 = insFld(foldersTree, gFld('<div class = 'personalnotes'>" & MyContinent("txtMyContinent"
& "</div>', ''))"
'Should list the country with the associated continent
Response.write " aux2 = insFld(aux1, gFld('<div class = 'personalnotes'>" & MyCountry & "</div>', ''))"
'Should list the Town with the associated country and continent
Response.write " insDoc(aux2, gLnk('R', '<div class = 'personalnotes'>" & MyTown & "</div>', ''))"
Also I would like to have all records distinct (e.g no repeat continents etc.)
Thanks in advance for any help on this complicated question
If I hard code the javascript it works fine but now I'm trying to get the results from a database but would like some help on the SQL statement.
Response.write "USETEXTLINKS = 1 //replace 0 with 1 for hyperlinks"
Response.write "// Decide if the tree is to start all open or just showing the root folders"
Response.write "STARTALLOPEN = 0 //replace 0 with 1 to show the whole tree"
Response.write "ICONPATH = '' //change if the gif's folder is a subfolder, for example: 'images/'"
'Root folder does not need to change
Response.write "foldersTree = gFld('<div class = 'personalnotes'>Continents</div>', '')"
'Should like the associated continent
Response.write " aux1 = insFld(foldersTree, gFld('<div class = 'personalnotes'>" & MyContinent("txtMyContinent"
'Should list the country with the associated continent
Response.write " aux2 = insFld(aux1, gFld('<div class = 'personalnotes'>" & MyCountry & "</div>', ''))"
'Should list the Town with the associated country and continent
Response.write " insDoc(aux2, gLnk('R', '<div class = 'personalnotes'>" & MyTown & "</div>', ''))"
Also I would like to have all records distinct (e.g no repeat continents etc.)
Thanks in advance for any help on this complicated question