?
Solved

how to add back, print functions in a jsp page

Posted on 2006-06-20
2
Medium Priority
?
210 Views
Last Modified: 2010-04-01
Hi, I am currently designing a jsp pages.  I need to add two buttons in my page. One is a back button which will help me back to previous page, and one is print page which will print the current page. How to do that, thanks.
0
Comment
Question by:ly_uwo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
pablomorales earned 720 total points
ID: 16945278
You need to use Javascript for that.

For printing:

<form>
<input type="button" value="Print this page" onClick="window.print()">
</form>

For the back button:

<script>
function goback() {
    history.go(-1);
}
</script>

<form>
<input type="button" value="Back" onClick="goback()">
</form>
0
 

Author Comment

by:ly_uwo
ID: 16946166
excellent, it helps a lot, thank you!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this modest contribution, I want to share with the IT community (especially system administrators, IT Support Engineers and IT Help Desks) about Windows crashes/hangs and how to deal with these particular problems.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question