This may be a very easy one, but I am having problem while using onclick="javascript:history.back(-1);"
with PHP. In the first page, I get a search result and I have used a post action to get the search criteria. From this page, I can view the details of the search result. When I go back to the search result page for IE, I get nothing but the page displays "webpage has expired."
这可能是一个非常简单的,但我在使用onclick =“javascript:history.back(-1);”时遇到了问题。用PHP。在第一页中,我获得了搜索结果,并且我使用了帖子操作来获取搜索条件。在此页面中,我可以查看搜索结果的详细信息。当我回到IE的搜索结果页面时,我得到的只是页面显示“网页已过期”。
What can I do about this problem?
我该怎么办这个问题?
Thanks in advance!
提前致谢!
4 个解决方案
#1
You should use the POST/redirect/GET pattern:
您应该使用POST / redirect / GET模式:
#2
It seems that IE is not re-posting the form when you go back to that page. Have you considered using a GET request for your search?
当你回到那个页面时,似乎IE没有重新发布表单。您是否考虑过使用GET请求进行搜索?
#3
The problem (probably) is that you may be using POST request to generate the search results.
问题(可能)是您可能正在使用POST请求来生成搜索结果。
Just my curiosity: which version of IE are you using?!
只是我的好奇心:你使用的是哪个版本的IE?!
#4
Try posting the form to itself (the same page) instead of another page, then if there is an error you don't have to 'go back' because you are already there! Simply print out the form again and fill in the values that were posted along with a message that something in the form didn't validate.
尝试将表单发布到自己(同一页面)而不是其他页面,然后如果有错误,您不必“回去”,因为您已经在那里!只需再次打印表单并填写发布的值以及表单中的某些内容未验证的消息。
#1
You should use the POST/redirect/GET pattern:
您应该使用POST / redirect / GET模式:
#2
It seems that IE is not re-posting the form when you go back to that page. Have you considered using a GET request for your search?
当你回到那个页面时,似乎IE没有重新发布表单。您是否考虑过使用GET请求进行搜索?
#3
The problem (probably) is that you may be using POST request to generate the search results.
问题(可能)是您可能正在使用POST请求来生成搜索结果。
Just my curiosity: which version of IE are you using?!
只是我的好奇心:你使用的是哪个版本的IE?!
#4
Try posting the form to itself (the same page) instead of another page, then if there is an error you don't have to 'go back' because you are already there! Simply print out the form again and fill in the values that were posted along with a message that something in the form didn't validate.
尝试将表单发布到自己(同一页面)而不是其他页面,然后如果有错误,您不必“回去”,因为您已经在那里!只需再次打印表单并填写发布的值以及表单中的某些内容未验证的消息。