Solved

how to add back, print functions in a jsp page

Posted on 2006-06-20
2
198 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
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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
library class in java 1 92
web service Rest Client creation 4 87
How to group array of objects ? 5 65
I get error: useBean: Duplicate bean name: {0} 1 138
If you thought ransomware was bad, think again! Doxware has the potential to be even more damaging.
When you have clients or friends from around the world, it becomes a challenge to arrange a meeting or effectively manage your time. This is where Outlook's capability to show 2 time zones in one calendar comes in handy.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

823 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