Solved

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

Posted on 2006-11-24
3
501 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Part One of the two-part Q&A series with MalwareTech.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

627 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