To Add the Expand collapse functionality in a .jsp to display and hide the data
Details:
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
Example:
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:
Table1:
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.
Table2:
Details S.No S.Name S.Address
--------------------------------
- 10 Alex Texas
Jeanne Boyarsky wrote:Can you use jQuery? Take a look at the "my profile" page here for an example.
how do I do that ? Do you have any example? I need to get data ,when user clicks on the link and expand it with data. And more importantly,the screen should not reloaded. Thanks, I appreciate your insights.. cana you please tell me how do I go to your profile?
P.S. If an accordion is not what you are looking for because the data is hierarchical (like a file system), you can alos find many jQuery tree plugins.