how to get javascript to execute on page load
607218Jul 18 2008 — edited Jul 22 2008Hi -- I have some javascript defined in the page header of my application home page. P1_LOGIN_MESSAGES is set by a process in the login page, as is app_item LAST_REQUEST. The login process redirects to page 1. The page1 header script is:
<script type="text/javascript">
var jsRequest = '&LAST_REQUEST.';
alert('jsRequest is: '+ jsRequest);
// Do this only if just logged in
if (jsRequest == 'LOGIN')
{
// Display login permissions messages
alert(:P1_LOGIN_MESSAGES');
if (:IS_CZAR == 1)
{
// Check slave connections
// Print any messages associated with slaves
alert((:P1_LOGIN_MESSAGES');
}
}
</script>
Is javascript in the page header supposed to execute every time on page load? it appeared to be working in a test scenario, but when I moved it to the actual login/home page, it stopped executing at all.
Help?
Thanks,
Carol