refreshing frames with javascript
Hi everyone,
I'm facing this problem for sometime and get any solutions.
I have a frames which has a leftframe & a mainframe.This page is loaded by default. The main frame has a login screen where users can login and enter .Here only the mainframe page is submit and it does not have any affect on the leftframe.It remains static irrespective of the mainpage login. It only changes when the user signs out and the default page is loaded again.
I have to change the status of the leftframe i.e refresh it from the mainpage. The users have 2 lecels 1 & 2.The 1 level user is the topadmin and can access all the menus in the leftframe & level 2 user can only see the menus made visible by user level 1.
This action takes place when the user logs in and the checking for level of user is done.
I have kept 2 diffrenet leftframe pages one with all menus another with menus that are made visible by user level 1.
I'm using the following code but this does not work...
<script language="JavaScript">
function check_admin()
{
<% if session("adminlevel")="" or session("adminlevel")="1" then%>
parent.left.location="leftframe.asp";
<% Else %>
parent.left.location="leftframe_checked.asp";
<% End If %>
}
</script>
I'm using this code in the onload function of the signing in page i.e the main page.
***Can anyone help me to refresh the leftframe from the sign-in page.If not any other suggestion to solve this problem.
|