Error Handling/Session Timeout with APEX & Ajax / Javascript
In our project we have the problem, that a session timeout can happen when the user remains on the same page and a jQuery/JavaScript/ajax-process is used.
If an action calls a ajax process without an active session is calling within a popup the html of the login page is show to the user.
How could an error handling be implemented that no html will be shown in the popup?
Further on we have external JavaScript-Files which need to read the content of Application Items.
Is there any elegant/small/reuseable way to get the value of the application Items?
The &APP_ID. Syntax doesn't work in external JS-Files.