Hi folks,

Im putting together an online form and wish to have little icons spread through out to offer context sensitive help using a hidden layer that will show itself when the icon is clicked.

I've seen something similar on a Forum somewhere (I thought it was here) where you could click an icon beside a username in a thread and details about the person appeared under their name.

I've got some code together but it doesnt work properly. The layer it creates although its invisible is still there and any text or tables placed underneath have alarge blank space where the hidden layer is.

Any help on this would be great thanks.

Here is my lame code at the moment.


<script language="JavaScript">

ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

function showhide(id) {
if (ns4) {
if (document.layers[id].visibility == "show") { document.layers[id].visibility = "hide" }
else { document.layers[id].visibility = "show" }

else if (ie4) {
if (document.all[id].style.visibility == "visible") document.all[id].style.visibility = "hidden"
else document.all[id].style.visibility = "visible";



<A HREF="javascript:showhide('H1')">show</A>

<DIV ID="H1" STYLE="visibility: hidden">



And here is a link to my broken version of it online (with all the info and details around it), its a form but its not connected up yet.

Many thanks.