Solved

history.back gives error

Posted on 2004-03-24
5
498 Views
Last Modified: 2006-11-17
I have a page in asp where there is a back button.

<td width="59"><a href="javascript:history.back(-1);"><img src="img/back.gif" width="59" height="25" border="0"&#12288; alt="BACK"></td>

when clicked on back button it is giving error like "for security reasons information posted can not be automatcially displayed. plz click refresh button ". this code works fine on a machine with IE some  machine  but at some other machine, it is giving such error.
Does this occur with some  version of IE? and if so, how to avoid that?
can anyone suggest me a solution?
thanks in advance..
0
Comment
Question by:DGDGDG
[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
5 Comments
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 10666266
>>for security reasons information posted can not be automatcially displayed. plz click refresh button
It's not an error, actually it's the feature of IE browser, as your page before the current page is generating dynamic data and the page itself is not cached. Try post your page before the current page here, and remove any html tag, or server side script that remove page cache.

and always remember to put a "return false" in your link, try:

<td width="59"><a href="back()" onclick="javascript:history.back(-1);return false;"><img src="img/back.gif" width="59" height="25" border="0"&#12288; alt="BACK"></td>

0
 

Author Comment

by:DGDGDG
ID: 10666867
thanks for ur help ryancys.
i will try out with this.
but as this msg is beign displayed at some machine and not on the othe, i wud like to know if  thereis  any setting of IE which will disable  the display of such message? any security settings?
thanks in advance....
0
 
LVL 52

Accepted Solution

by:
Ryan Chong earned 50 total points
ID: 10698808
do you have a link of that page, or snapshot of that page?

just do a test by replacing the javascript history.back with window.location, see if this problem remain or not, like:

<td width="59"><a href="back()" onclick="javascript:window.location.href='previouspage.asp';return false;"><img src="img/back.gif" width="59" height="25" border="0"&#12288; alt="BACK"></td>
0

Featured Post

Increase your protection from Zero Day threats!

Running two Antivirus' is never a good idea.
Taking advantage of Multiple Security layers on the other hand can often save your hide.
See which top notch security software brands have been proven to happily coexist together.
Reduce your chances of becoming a statistic.

Question has a verified solution.

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

Internet is a big network which is formed by connecting multiple small networks.It is a platform for all the users which are connected to it.Internet act as platform in different fields. Such as: Internet  as a collaboration platform. Internet  as…
Several part series to implement Internet Explorer 11 Enterprise Mode
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

732 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