Back Button Javascript Code - Technology - Contractor Talk

Back Button Javascript Code

 
Thread Tools Search this Thread Display Modes
Old 06-26-2006, 11:12 PM   #1
Pro
 
Mike Finley's Avatar
 
Trade: Bathroom Remodeling
Join Date: Apr 2004
Location: Littleton, Colorado
Posts: 14,078
Rewards Points: 2,000

Back Button Javascript Code


Anybody know the javascript coding for a back button that takes you back to the previous page you were viewing no matter what it was?

I used to have this code and need it again, but can't see to find it.

It had something to do with history -1 or something like that using the browsers memory cache.
Mike Finley is offline  

Warning: The topics covered on this site include activities in which there exists the potential for serious injury or death. ContractorTalk.com DOES NOT guarantee the accuracy or completeness of any information contained on this site. Always use proper safety precaution and reference reliable outside sources before attempting any construction or remodeling task!

   

Advertisement

 

Old 06-27-2006, 12:31 AM   #2
Pro
 
mickeyco's Avatar
 
Trade: Squirrel Handler
Join Date: May 2006
Location: Chicago
Posts: 3,432
Rewards Points: 2,000

Re: Back Button Javascript Code


There's a hundred ways to do it, here are a few:

1.
<a href="javascript:history.go(-1)" onMouseOver="self.status=document.referrer;return true">Go Back</a>


2.
<input name="btnBack" title="back"
onMouseOver="window.status='Previous Page'; return true"
onMouseOut="window.status=''; return true"
onclick="location.href = 'javascript:history.go(-1)'" ; type="button"
value="Previous Page">


3.
<form>
<input type=button value="Back"
onCLick="history.back()">
</form>



4.
<INPUT TYPE="button" VALUE="Back" onClick="history.go(-1);">

Advertisement

mickeyco is offline  
Old 06-27-2006, 11:43 AM   #3
 
Enka's Avatar
 
Join Date: Jun 2006
Posts: 7
Rewards Points: 10

Re: Back Button Javascript Code


for java script codes I goto google and type in java script source and it should be the top link.

They have a huge database of javascript but there site is a bit messy
Enka is offline  


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
connections to the back of a switch AustinDB Electrical 50 11-17-2006 08:12 PM
Gettin back in the seat this weekend:) IHI Off Topic (Non Trade) 8 08-01-2006 10:29 AM
Exterior hard drive for back up. Mike Finley Technology 5 07-24-2006 04:51 AM

Join Now... It's Fast and FREE!

I am a professional contractor
I am a DIY Homeowner
Drywall Talk is for
PROFESSIONAL CONTRACTORS ONLY!

At DrywallTalk.com we cater exlusivly to professional contractors who make their living as a contractor. Knowing that many homeowners and DIYers are looking for a community to call home, we've created www.DIYChatroom.com DIY Chatroom is full of helpful advices and perfect for DIY homeowners.

Redirecing in 10 seconds
No Thanks
terms of service

Already Have an Account?