|
|
#1 |
|
New Member
![]() Join Date: Feb 2010
Posts: 6
|
Hello guys,
I have a question: Is there a possibility that if someone clicks on a link, he goes back to the previous page? It would be awesome if it fits in: Code:
<a href="#" and </a> Thank you!!!!!!!!! |
|
|
|
|
|
#2 |
|
New Member
![]() Join Date: May 2009
Posts: 11
|
I use a Javascript function
Code:
function prevPage() {
history.back();
}
Code:
<a href="javascript:prevPage()">Back to previous page</a> |
|
|
|
|
|
#3 |
|
Bronze Member
![]() Join Date: Mar 2010
Location: Norfolk, UK
Posts: 78
|
Here are a couple more variants (no functions required):
Code:
<input type=button value="back" onclick="history.go(-1)" /> Code:
<a class="button" onClick="history.go(-1)" title="go back" >< go back</a> |
|
|
|
|
|
#4 |
|
Silver Member
![]() Join Date: Dec 2009
Location: Minnesota
Posts: 136
|
I also use the second line of code quite often..simple and effective.
__________________
Minnesota Web Development |
|
|
|
|
|
#5 |
|
New Member
![]() Join Date: Apr 2010
Posts: 7
|
<SCRIPT language="JavaScript">
{ //window.location="http://www.davidrfreelandjr.com/zmail-inquiry4.htm"; window.location=document.referrer; } </SCRIPT> stick that in tha page the link targets, it will open the page for 1/10th of a second, and send them back whereever they cames from <body onunload="KeepThemHere"> above, stick a function call from the onunload event, never done it, but you could do like: function KeepThemHere() { window.location="http://www.yourSite.com/thePageTheyWereAt.htm"; } Last edited by 10west; 04-19-2010 at 02:44 AM. Reason: unknown |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|