OceanDesigner
Programmer
I have a problem with the format of my pages. I have not been able to come up with the exact cause. It is definitely related to the use of the back button, and possibly timeout of the server.
I will lay out the basic page format and then describe the problem. The page structure is in the code below. I set up a table with two columns. In the top row, I write a header (from an include file). In the left column of the second row, I put a menu (also from an include file). In the right column of the second row is the main body of the page. The menu displays options based on user roles - so there are several IF statements testing against session variables that house the role.
Basic Page Layout:
Example of the menu include file:
When the user navigates through the site using the controls (buttons and hyperlinks) built within the pages, the pages behave properly. Periodically, when the browser's Back button is used however, the whole layout gets messed up. First, the menu disappears altogether. Second, the main body displays to the right of the header rather than beneath it. I can't seem to figure out the circumstances that lead up to this behavior. It definitely comes from the use of the back button. I think it also has to do with the server timing out (based on inactivity). I cannot reproduce the behavior consistently. This problem started when we switched the web server from NT to 2003. The problem may be related to the server itsself, or different settings on the new server.
I am fishing a little here because I really don't know what is wrong. Any ideas are really appreciated.
Thanks,Jeff
I will lay out the basic page format and then describe the problem. The page structure is in the code below. I set up a table with two columns. In the top row, I write a header (from an include file). In the left column of the second row, I put a menu (also from an include file). In the right column of the second row is the main body of the page. The menu displays options based on user roles - so there are several IF statements testing against session variables that house the role.
Basic Page Layout:
Code:
<%
'Authentication code - gets username and level from session variables and redirects to the login page if timed out
'Database transactions
%>
<html>
<body>
<!--#include file="includes/header.htm"-->
<table width="760" border="0" cellpadding="4" align="center">
<tr>
<td width="150" align="left" valign="top"><!--#include file="includes/menu.htm"--></td>
<td valign="top">
BODY OF THE PAGE
</td>
</tr>
</table>
<!--#include file="includes/footer.htm"-->
</body>
</html>
Example of the menu include file:
Code:
level = Session("role")
<% if level = 10 or level = 2.2 then %>
<tr><td><a href="AdministrationMenu.asp">Administration Menu</a></td></tr>
<%end if %>
<% if level >= 3 then %>
<tr><td><a href="WarrantyMenu.asp">Warranty Menu</a></td></tr>
<% end if%>
When the user navigates through the site using the controls (buttons and hyperlinks) built within the pages, the pages behave properly. Periodically, when the browser's Back button is used however, the whole layout gets messed up. First, the menu disappears altogether. Second, the main body displays to the right of the header rather than beneath it. I can't seem to figure out the circumstances that lead up to this behavior. It definitely comes from the use of the back button. I think it also has to do with the server timing out (based on inactivity). I cannot reproduce the behavior consistently. This problem started when we switched the web server from NT to 2003. The problem may be related to the server itsself, or different settings on the new server.
I am fishing a little here because I really don't know what is wrong. Any ideas are really appreciated.
Thanks,Jeff