ccoder
09-23-2003, 01:11 PM
I have a working web page that is using layers to position various objects on the page. These objects are all either created or filled in using JavaScript and/or Java applets. I also toggle the visiblity of several of the initial layers, essentually replacing them with new objects.
Now I have to incorporate the page into a template in order to meet corporate web site standards. This change has caused a number of problems.
Here is the template that I am using.
<BODY topmargin="25" leftmargin="5" marginwidth="5" marginheight="25">
<!-- ----------------------Do not remove these include files------------------------------ -->
<script type='text/javascript'>
function Go(){return}
</script>
<script type='text/javascript' src='_includes/mainmenu_var1.js'></script>
<script type='text/javascript' src='_includes/mainmenu_text.js'></script>
<script type='text/javascript' src='_includes/mainmenu.js'></script>
<noscript> Your browser does not support script</noscript>
<!-- ------------------------------------------------------------------------------------- -->
<table border="0" cellpadding="0" cellspacing="0" width="800" >
<tr valign="top">
<td width="1" valign="top" background="/_images/black_fill.gif"></td>
<td width="5" valign="top" background="/_images/clear.gif"></td>
<!-- ----------------------------------------------------------------------------------- -->
<!-- Main column starts here. This is where you put your main content. ----------------- -->
<!-- Remember! it is 783px wide. If you place your own table or any other -------------- -->
<!-- elements here size them less than 780 px!!!!! ------------------------------------- -->
<td width="783" valign="top">
<!-- !!!!!!!!!!End of your content. Do not make any changes beyong this point!!!!!!!!!! -->
<!-- ---------------------------------------------------------------------------------- -->
</td>
<td width="10" valign="top" background="_images/clear.gif"></td>
<td width="1" valign="top" background="_images/black_fill.gif"></td>
</tr>
<tr>
<td width="800" height="20" bgcolor="black" colspan="7">
<!-- #INCLUDE virtual="_includes/footer_nav.htm" -->
</td>
</tr>
<tr>
<td background="_images/black_fill.gif" width="800" height="1" colspan="7"></td>
</tr>
</table>
<!-- #INCLUDE VIRTUAL="/_includes/footer_copy.htm" -->
</BODY>
The layer layout looks like:
--------------------
| | |
| 1 | 2 |
| | |
--------------------
| |
| 3 |
| |
--------------------
Problem #1:
My 'form' goes into the middle (3rd of 5) cell in the first row of the table. When the page displays, the last 2 rows are at the top of the page behind the first row with my form.
Problem #2:
My form loads and displays correctly, but when the user submits their first request, layers 1 and 3 are hidden and layers 4 & 5 are made visible. However, layer 5 (should replace layer 3) does not appear.
Problem #3:
Layer 2 contains a number of controls, including several select lists. These select lists show through the drop-down menus that are just above the two upper layers. I recall seeing a post somewhere, sometime that dealt with this problem and I am under the impression that there is no fix for this. Is this true?
So, my question is, how much of problems 1 & 2 points to my use of layers inside the table cell?
Now I have to incorporate the page into a template in order to meet corporate web site standards. This change has caused a number of problems.
Here is the template that I am using.
<BODY topmargin="25" leftmargin="5" marginwidth="5" marginheight="25">
<!-- ----------------------Do not remove these include files------------------------------ -->
<script type='text/javascript'>
function Go(){return}
</script>
<script type='text/javascript' src='_includes/mainmenu_var1.js'></script>
<script type='text/javascript' src='_includes/mainmenu_text.js'></script>
<script type='text/javascript' src='_includes/mainmenu.js'></script>
<noscript> Your browser does not support script</noscript>
<!-- ------------------------------------------------------------------------------------- -->
<table border="0" cellpadding="0" cellspacing="0" width="800" >
<tr valign="top">
<td width="1" valign="top" background="/_images/black_fill.gif"></td>
<td width="5" valign="top" background="/_images/clear.gif"></td>
<!-- ----------------------------------------------------------------------------------- -->
<!-- Main column starts here. This is where you put your main content. ----------------- -->
<!-- Remember! it is 783px wide. If you place your own table or any other -------------- -->
<!-- elements here size them less than 780 px!!!!! ------------------------------------- -->
<td width="783" valign="top">
<!-- !!!!!!!!!!End of your content. Do not make any changes beyong this point!!!!!!!!!! -->
<!-- ---------------------------------------------------------------------------------- -->
</td>
<td width="10" valign="top" background="_images/clear.gif"></td>
<td width="1" valign="top" background="_images/black_fill.gif"></td>
</tr>
<tr>
<td width="800" height="20" bgcolor="black" colspan="7">
<!-- #INCLUDE virtual="_includes/footer_nav.htm" -->
</td>
</tr>
<tr>
<td background="_images/black_fill.gif" width="800" height="1" colspan="7"></td>
</tr>
</table>
<!-- #INCLUDE VIRTUAL="/_includes/footer_copy.htm" -->
</BODY>
The layer layout looks like:
--------------------
| | |
| 1 | 2 |
| | |
--------------------
| |
| 3 |
| |
--------------------
Problem #1:
My 'form' goes into the middle (3rd of 5) cell in the first row of the table. When the page displays, the last 2 rows are at the top of the page behind the first row with my form.
Problem #2:
My form loads and displays correctly, but when the user submits their first request, layers 1 and 3 are hidden and layers 4 & 5 are made visible. However, layer 5 (should replace layer 3) does not appear.
Problem #3:
Layer 2 contains a number of controls, including several select lists. These select lists show through the drop-down menus that are just above the two upper layers. I recall seeing a post somewhere, sometime that dealt with this problem and I am under the impression that there is no fix for this. Is this true?
So, my question is, how much of problems 1 & 2 points to my use of layers inside the table cell?