Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

disabling a menu item  RSS feed

 
shyamkumar bopannachengalaiah
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am developing a webapplication where i have an menu tree that contains subject name as parent and its child tree as chapters and chapters child tree is subtopics and practical tests. in this menu i have to display only the first chapter when the user login first, the other chapters in the subject should be disabled.the user after finishing the first chapter and taking up the practical test , then only he has to go for the second chapter.how can i do this?
 
Ankit Garg
Sheriff
Posts: 9610
37
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't understand what do you mean by menu tree. Is it a menu like this



or a tree view like this



If it is a menu i.e. like the first one, then you must just display the heading as plain text instead of a hyperlink. Just check into the user's session to see if he/she has completed the chapter. Or if this behavior must persist during multiple logins, then you'll have to store this information in the database.

If it is a tree view like this second one, then I think this will depend on the javascript tool that you use. I don't think that you would implement your own javascript tree ...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!