Solved

how to add back, print functions in a jsp page

Posted on 2006-06-20
2
192 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
2 Comments
 
LVL 4

Accepted Solution

by:
pablomorales earned 180 total points
Comment Utility
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
Comment Utility
excellent, it helps a lot, thank you!
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now