Skip to main content

Expand collapse functionality in a .jsp

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2011-05-12

I can use HTML,DHTML,JAVASCRIPT AND JSP. I will not be able to use any other technology.
First step:
I have to display NAME first with an arrow image or mark along side,NAME should be pulled from datasource.
second step:
when click on the above arrrow mark,it should call server to get more data associated with the NAME.
third step:
when we again click on arrow,it should collapse and show only name.
NAME : John>
click on arrow
NAME: John
Address: 23/34 fost avenue
state : LA
again click on arrow
NAME : John>

Can anybody help me to to do it?
I want to make it as a common and reusable one so that i can use everywhere..
To Add the Expand collapse functionality in a .jsp to display and hide the data

Here I'm able to get the data from webservices to jsp. While displaying the data there is a provision to show and hide some of its data
If Suppose there are 3 rows(Student data) coming from database, Say each row as Student for instance. and Each student is associated with some courses(Say course1, course2 and course3).
Appearance should look like this:
Details S.No S.Name S.Address
+ 10 Alex Texas
+ 20 John Dallas
+ 30 Nick Newyork
Now if we click on + button associated with first record, it should exapand and show the first record details and - button to be displayed as shown below.
Details S.No S.Name S.Address
- 10 Alex Texas
course1 : Java
cpurse2 : j2ee
- 20 John Dallas
course1: .Net
course2: php
+ 30 Nick Newyork

And when when we click on - button it should hide the data and should display the above data as Table1.

Here I got all the data dynamically. The only problem is UI arrangement(Displaying it).

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2011-05-16

Hi. Can you tell why you such hard limit with relate is used technologies.I piece of adive to use MVC architecture. which base on JSP, Servlet relation, It has more performance then just use only JSP. And how I understand you ask that anybody make it instead you. It is bad, Just try yourself, It is more useful for you.