navigateTo (targetPage, applyChanges, quiet)
The applyChanges attribute executes a checkData(), not a commit. The navigation will not be executed if checkData() fails.
The quiet attribute suppresses information messages of the checkdata() call, error messages are always displayed.
Any script written after a navigateTo() call is executed in the context of the new page. This is possible because the script parts after such a call are sent along with the page that is navigated to. For example, the script:
setSearchValue("EMP", "EMP_NAME", "J%");
shows a navigation to the EMP page which will then query and display all employees whose name begins with 'J'.
Example: deleting an employee by clicking a button
External file: c:\temp\test.js
callClientScript(navigateTo(Employees);setSearchValue(EMP,NAME, search_name); executeQuery();deleteRecord();closePage())
alert(employee + search_name + is deleted, you still need to commit)
Button script file property: c:\temp\test.js
Button script property (inline script): deleteEmp (JAN)
Result: click the button, employee JAN is deleted, and you will see the message box. It will appear as long as you stay on the current page because all page navigation is performed in the background.