Solved

Menu Design using XML, DOM PARSER(Java),Jsp

Posted on 2006-11-24
3
482 Views
Last Modified: 2013-11-23
SUBJECT

                I want to display a menu in jsp from xml document using DomParser. that DomParser Code should be written in java we can handle the event using javascript.for desig we can use HTML & CSS .

                 i know to get a data from xml using dom parser and also i displayed a value into the jsp page, but i can't able to from display the data like a menu.

                can you help me for that

if you know the answer send me to my mail id (selvaraj.ravikumar@cognizant.com or ravikumar.sun.java@gmail.com)
 
My XML File Content is like This,
 

<?xml version="1.0" encoding="UTF-8"?>
<application name="mtm">
            <menuDefinition role="admin">
                        <menu>
                              <menuId>0</menuId>
                              <name>File</name>
                        </menu>
                              <menu>
                                    <menuId>1</menuId>
                              <parentId>0</parentId>
                                    <name>open</name>
                              </menu>
      <menu>
                                    <menuId>2</menuId>
                              <parentId>0</parentId>
                                    <name>save</name>
                              </menu>
                        <menu>
                              <menuId>1</menuId>
                              <name>Edit</name>
                        </menu>
                        <menu>
<menuId>1</menuId>
                                    <parentId>1</parentId>
                        <name>Cut</name>
      </menu>
      <menu>
                                    <menuId>2</menuId>
                                    <parentId>1</parentId>
                                     <name>Copy</name>
       </menu>
                  </menuDefinition>

</application>


i want the output Jsp page like

                                              File  >
                                              Edil  >


If we pressing the File Menu Know it should be display like,
 
                                              File  >
                                                   New
                                                   Open
                                              Edil  >

If we pressing the Edit Menu Know it should be display like,

                                              File  >
                                              Edil  >
                                                  Cut
                                                  Copy


If we pressing the Edit Menu – SubMenu Copy Know it should be display like,

                                              File  >
                                              Edil  >
                                                  Cut
                                                  Copy >
                                                            ClipBoard
 

with regards
ravi(cts pvt ltd-india)
selvaraj.ravikumar@cognizant.com
9884599329
 
0
Comment
Question by:srinivasdumpala
3 Comments
 
LVL 9

Accepted Solution

by:
matthew016 earned 500 total points
ID: 18085714
U will need HTML, CSS and Javascript.

use ID's in CSS for each menu, then u hide/show the submenu's via Javascript code if u detect a click on a menu.


document.getElementById("someElementIdHere").style.display='';                // to reset the display status (to show)
document.getElementById("someElementIdHere").style.display='hidden';      //(to hide)


<table style="display:hidden" />    (<-- the submenu's are hidden by default)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
topping1 challenge 7 73
WPF - Tooltips for ComboBox items 5 38
Java - Why doesn't this JFrame work 3 44
servlet example issue 6 32
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now