WEBDEV Concepts
150 Part 4: Advanced concepts 2 Preventing from using the "Back" button If the browser "Back" button is used to display the previous page, this action will have no effect. 2.1 Operating mode Disabling the "Previous page" feature of the browser inserts the following JavaScript code into the generated HTML page: <SCRIPT LANGUAGE="JavaScript"> history.forward() </SCRIPT> When running the page in a browser, it will not be possible to go back to this page by using the "Back" button. Remarks : • Clicking the browser "Back" button can make the page blink. • This mechanism can fail if a click of the "STOP" button is run before the forward() statement is run by the browser. 2.2 Implementation To disable the browser "Back" button for a specific page : 1. Open the page description window: on the "Page" tab, in the "Description" group, click "Description". 2. In the "UI" tab, for "Browser "Back" button", select "Forbidden". 3. Validate. To disable the browser "Back" button for all the project pages : 1. Open the project description: on the "Project" tab, in the "Project" group, click "Description". 2. Click on the "Advanced" tab. 3. For "Default option for the browser "Back" button", check "Forbidden". 4. Validate. This option will be automatically taken into account for all new site pages. 3 Managing synchronization 3.1 Overview For each action performed in a page, the mechanism for page synchronization automatically checks the synchronization. This check consists in verifying whether the page displayed in the browser corresponds to the page context found on the server. Two modes can be used to manage the synchronization: 1. Default synchronization management. 2. Management of the synchronization through programming, in the page synchronization code. 3.2 Default synchronization The synchronization mechanism is triggered only if the option "Use the mechanism for synchronizing pages" is selected for the page. If a desynchronization occurs, a warning message informs the user that the requested action has not been performed. The page corresponding to the context on the server is re-displayed. The site can continue to operate. To enable synchronization in a page : 1. Open the page description window: on the "Page" tab, in the "Description" group, click "Description". 2. In the "UI" tab, for "Browser "Back" button", select "Allowed (runs the synchronization code)". 3. Validate. This page will be automatically included in the browser page history: to go back to this page, click the browser "Back" button.
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==