• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Toggling of a table

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello guys.. I struck at some point of developement. Here is the scenario.

I am getting some values from DB based on user input and displaying on the table format in JSP.
now my requirement is there should be "+" symbol beside every row.. when the user clicks on "+" sign it should expand the grid and should display another table(with in the current table) data by accepting the some value in the first table as input(Basically it should exucute another query by taking the value where the user clicks on "+"), in the current table;

Any help would greatly appreciated.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, you could either post back to the server to get the extra info, and recreate the table with the extra info inserted. Or, you could just place all the extra data in the table in the first place, but hidden, and show it when required. Or, you could use Ajax to fetch the extra info and show it when the icon is clicked.
 
Revanth reddy
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No answers from any body.....hmmm
i think my questions is not clear enough.

let me explain again.

i have the table in jsp.as shown below.

id name tech
+ 133 exam java
+ 134 exam1 jsp
+ 135 exam2 struts


now when the user clicks on + one more row should be displayed in the same table (need to get the values from the database)
basically it should execute a query.

SELECT * FROM table where id = ?(? is the id on c=which user clicks on +)



output should be::::

id name tech
- 133 exam java
id data date flag
133 sample 11nov08 Y

+ 134 exam1 jsp
+ 135 exam2 struts

i am not sure how to achieve this in jsp, javascipt. we can use toggling, but i am not sure it can be worked with dynamic data.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by kumar kosaraju:
No answers from any body.....hmmm


Guess I'm a nobody.

If you're looking for how to make this work, I've already answered you. If you're looking for code to get written for you, you may be in the wrong place.
[ November 11, 2008: Message edited by: Bear Bibeault ]
 
Be reasonable. You can't destroy everything. Where would you sit? How would you read a tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic