Copy link to clipboard
Copied
ColdFusion doesn't work with 'browser history'-- 'window.history.go(-1)'.
Copy link to clipboard
Copied
Coldfusion code runs on the server. The code 'window.history.go(-1)' is Javascript, which runs on the browser.
Copy link to clipboard
Copied
CF 8,9,10 work with 'browser history'-- 'window.history.go(-1)'.
CF 11 doesn't work with 'browser history'-- 'window.history.go(-1)'.
Copy link to clipboard
Copied
I have tested it with ColdFusion 11 (Build 11.0.03.292480) on Internet Explorer 11, Firefox 35 and Chrome. It works as expected.
My test files are as follows:
page1.cfm
<a href="page2.cfm">Go forward to page2.cfm</a>
page2.cfm
<a href="page3.cfm">Go forward to page3.cfm</a><br><br>
<button onclick="goBack()">Go back 1 page to page1.cfm</button>
<script type="text/javascript">
function goBack() {
window.history.go(-1)
}
</script>
page3.cfm
<button onclick="goBack()">Go back 1 page to page2.cfm</button>
<script type="text/javascript">
function goBack() {
window.history.go(-1)
}
</script>
Copy link to clipboard
Copied
BKBK,
our case is more complicated:
It moves from one <form 1... > to <cfgrid ... > and then to <<form 2... > from <cfgrid ... > on the same page . On last <<form 2... > we have button< ... onClick="history.go(-1);" >.
It works on CF 8,9,10 but doesn't work on CF 11.
Chrome complains:
This webpage requires data that you entered earlier in order to be properly displayed. You can send this data again, but by doing so you will repeat any action this page previously performed.
Press the reload button to resubmit the data needed to load the page.
Error code: ERR_CACHE_MISS.
I think it's setup of CF 11 (page history).
Copy link to clipboard
Copied
Sorry to say that your explanation is unclear to me. In fact, I find it confusing.
You say "one 'page.cfm' has 2 html". Whereas there can only be one HTML tag per page. You also say "It moves from one <form 1... > to <cfgrid ... > and then to <<form 2... > from <cfgrid ... > on the same page ." . This seems to suggest a page containing 2 forms and 1 grid, including links and form-actions that point to the page itself. If so, then it will be absurd to attempt to go back to your current page.
In any case, the form attribute equivalent to a link is method="get". Whereas you are using method="post".
Copy link to clipboard
Copied
miked77835589 wrote:
It works on CF 8,9,10 but doesn't work on CF 11.
Chrome complains:
As you yourself say, Chrome complains, not ColdFusion 11.