Previous Topic: Browser User ExitsNext Topic: Customize userOnLoad in HTML Mode for Web View


Customize userOnLoad in ASP.NET Mode

This is the only user exit that executes on the browser. It is invoked when the browser executes the onLoad handler of the page. That is, userOnLoad is executed after all other processing on the page has occurred. To add user-specified logic, an HTMLControl must be added to the page where the user exit is to be used. This is done through the Navigation Diagram in ASP.NET mode.

Click Add, HTML Control in the Toolset main menu. The HTML Control Properties dialog opens where you can insert the following JavaScript:

<script>
function userOnLoad()
{
//Insert your code here ***
}
</script>

The preceding code executes the userOnLoad() method for every request (every time the page with the exit loads). To execute the user exit only the first time the page loads, modify the code as follows (subsequent requests that result in the same page being returned will not execute the exit):

<script>
function userOnLoad()
{
if (isNewWindow == true)
{
//Insert your code here ***
}
}
</script>