Solved

go back

Posted on 2004-04-20
2
334 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

691 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