Solved

go back

Posted on 2004-04-20
2
332 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
age from date of birth 4 51
Hide cell in a table 2 27
I was able to prove the index of the even , how can i get the even index? 4 28
Alert after MVC form submitted 1 22
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
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…

808 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