*
The moose likes HTML, CSS and JavaScript and the fly likes JSP page partial display Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "JSP page partial display" Watch "JSP page partial display" New topic
Author

JSP page partial display

Baba Bizlowsky
Ranch Hand

Joined: Dec 15, 2003
Posts: 39
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

Joined: Jan 10, 2002
Posts: 60741
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Dec 15, 2003
Posts: 39
Thanks for the answer, it works like a charm.
[ February 27, 2004: Message edited by: Baba Bizlowsky ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP page partial display
 
Similar Threads
CREATING FILE FROM SERVLET
how to get value selected on jsp2 on text field of jsp1?-urgent help!
pagination problem
submit form problem
passing the values from popup window to jsp