as the code in dynamicmenu.js has been derived from above site.
My Problem:
I read "Custom JSP Tag Library for Dynamic Menus" and used menu.zip, menu-example.war.But on using it & clicking on the Menu items i got the result page in the same frame, but i was using html frames and wanted to load the new page in another frame so after referring to website above & looking i just added target = "main" (main is the name of the target frame where the new page must get displayed), i just added that line in the function