Solved

go back

Posted on 2004-04-20
2
333 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

749 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