Solved

go back

Posted on 2004-04-20
2
329 Views
Last Modified: 2006-11-17
In the application i am wrting i am using the following:
<input type="button" class="formbutton" onClick="self.history.go(-1); return false" value="Cancel">

as a way of allowing the use to go back instead of using the back button....... but the following error seems to pop up sometimes....how do i prevent this? is there a better way of doing things?

Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you.

To resubmit your information and view this Web page, click the Refresh button.
0
Comment
Question by:danBosh
2 Comments
 
LVL 18

Expert Comment

by:Plucka
ID: 10867753
Hi danBosh,

It's happening because your trying to go back to a submitted form page, which ie doesn't allow, as the data would be reposted and cause problems. Not sure if there is a work around.

Regards
Plucka
0
 
LVL 1

Accepted Solution

by:
wmnibu earned 30 total points
ID: 10876503
Dear danBosh,

The above comment is true but thrs ia solution for that,

This is the solution for u,

instead of using self.history.go(-1);  use window.location
replace the url "http://mail.yahoo.com" with your.

Code :

<input type="button" class="formbutton" onClick="window.location='http://mail.yahoo.com'; return false" value="Cancel">

if the url is changeing you can pass it and print at 'http://mail.yahoo.com'

Hope this will work for u

wmnibu
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

708 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

13 Experts available now in Live!

Get 1:1 Help Now