Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 28th, 2004, 03:21 AM
Authorized User
Join Date: Apr 2004
Location: , , .
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default history.back or hitting the back button won't work


how come when I hit the back button in the browser's page, or put a button in my page using history.back, they won't work?

hope someone could help me on this..thanks!
Reply With Quote
  #2 (permalink)  
Old July 28th, 2004, 05:24 AM
Friend of Wrox
Join Date: Oct 2003
Location: Cochin, Kerala, India.
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp

May I know what error are you getting ? Are you getting a "Page expired" message which tells you to hit the refresh button ? If this is the case, then you may be submitting a form in post method to the previous page. You may be preventing the page to go to cache. In that case you cannot prevent this. This is a browser security feature. You may have to change the submission method of form to Get (if possible).

If the behaviour is not like this, please specify what exactly happening when you hit back button. You may give a piece of code in the page also.
Reply With Quote
  #3 (permalink)  
Old July 28th, 2004, 07:10 AM
Friend of Wrox
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts


When using a link, I do:

<a href="javascript:history.go(-1)">Back</a>

history.back I don't think is supported by all browsers, but history.go is.

Reply With Quote
  #4 (permalink)  
Old July 29th, 2004, 12:08 AM
Friend of Wrox
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post

  or u can use button.

<input type='button' value='Back' onclick='javascript:history.back();'>

If you want to appear as a link use CSS

input {border-style:solid;border-width:0;background-color:your current background;cursor:hand;}


Reply With Quote
  #5 (permalink)  
Old July 29th, 2004, 12:14 AM
Authorized User
Join Date: Apr 2004
Location: , , .
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts

Hi! Thanks for all those who replied. I tried using history.back but it won't work. Then I found out the calling page contains a javascript which prevents other pages to go back to it..thanks!

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Back Button j_rumpa Javascript How-To 8 July 4th, 2007 08:29 AM
How to prevent Back History after Sing Out my site hatem ASP.NET 1.0 and 1.1 Basics 2 December 28th, 2006 02:55 AM
Preventing Data Loss when hitting back button IronStar Javascript How-To 8 July 23rd, 2005 07:00 PM
Back Button DARSIN General .NET 0 March 1st, 2005 08:00 AM
history.back(-1); elania Javascript How-To 3 February 2nd, 2005 03:14 PM

All times are GMT -4. The time now is 06:08 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.