If we click Back button in the browser once after entering content using FCKeditor, the browser won't go to actual previous page, instead it will remain in samepage with the empty content. We noticed that clicking Back button two times displays correct previous page.
To avoid this issue, we have used below workaround.
- Find below the sample code.
And also, we have noticed that sometimes (e.g. after saving the content) we need to click browser back button 4 times to go the previous page.
To handle this scenario, we can enhance the above sample code by replacing -2 with a PHP variable whose value should be set either -2 or -4.
- pass a querystring parameter confim=updated once after finishing the save operation.
- use below code to assign value for a php variable based on the flow.
- Now this php variable can be used in our previous sample code.
updates on May 08:
It seems we need to use "return false" as below to avoid issue in some browsers (IE 7 and FireFox).