Hi all, I have a screen that lists records froma database using ASP. Each record has a small icon that when clicked displays further details by aking a hidden layer visible. Problem is that when the user scrolls the screen etc the layer still appears at the top of the screen as I've used absolute positing.
I've realised I need to use relative positioning but am now having problems as the layers are in a table and make the cells really deep etc. To get round this I think i need to use display:none but I'm not sure how to change the toggle display of layer code I have, the code is:
the start of my div layer code is:
Can anyone help me with this? I hardly ever use anything other than basic HTML and ASP!
Cheers
I've realised I need to use relative positioning but am now having problems as the layers are in a table and make the cells really deep etc. To get round this I think i need to use display:none but I'm not sure how to change the toggle display of layer code I have, the code is:
Code:
<script language="JavaScript1.2">
/*
Toggle Layer Visibility
© Eddie Traversa (nirvana.media3.net)
To add more shock to your site, visit [URL unfurl="true"]www.DHTML[/URL] Shock.com
*/
function toggleVisibility(id, NNtype, IEtype, WC3type) {
if (document.getElementById) {
eval("document.getElementById(id).style.visibility = \"" + WC3type + "\"");
} else {
if (document.layers) {
document.layers[id].visibility = NNtype;
} else {
if (document.all) {
eval("document.all." + id + ".style.visibility = \"" + IEtype + "\"");
}
}
}
}
</script>
the start of my div layer code is:
Code:
<td>
<Font face="Arial" size="2">
<%=(lg.Fields.Item("Description").Value)%>
<a href="javascript:;" onClick="toggleVisibility('sEdit<%=cnt%>','show','visible','visible')"><img src="images/qe.gif" border="0"></a>
<DIV id="sEdit<%=cnt%>" style="position:relative;top:100px;left:10px;visibility:hidden;display:none">
<Form name="QE<%=cnt%>" action="BA.asp" method="post">
<Table bgcolor="#ffcc88" width="100%">
<tr bgcolor="#ff9900">
Can anyone help me with this? I hardly ever use anything other than basic HTML and ASP!
Cheers