• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP page partial display

 
Baba Bizlowsky
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody.
I would like to create a JSP page which is not revealed to the user in it's whole the first time, but rather reveals itself partially after the user clicks a button.
Consider a block of text and a button [NEXT] below. The user clicks it and the next paragraph is shown and so on until the full text is displayed.
I solved the problem with constant refreshing and the Session attribute which counted how many times the [NEXT] button was clicked but I know that there must be a more simple and elegant solution.
Thanks for any kind of help.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64175
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A much better solution would be to put the 'hidden' data in a div with a style of 'display:none' and then set it to 'display:block' upon clicking the button. Simple and elegant and requires no error-prone book-keeping on the server side.
I'm moving this to the HTML/Javascript forum since the best solutions for this will be client-side operations.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Bear said you can show and hide information with no problem
Quick example

I just typed out the code, but it should be error free....
That should give youa god starting point...
Eric
[ February 26, 2004: Message edited by: Eric Pascarello ]
 
Baba Bizlowsky
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the answer, it works like a charm.
[ February 27, 2004: Message edited by: Baba Bizlowsky ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic