[thelist] need another pair of eyes... (DOM css)
Brian Cummiskey
brian at hondaswap.com
Mon Feb 5 09:26:37 CST 2007
I must be missing something simple here... need another set of eyes.
Simple hidden div on load, and when clicked, i want to display the form.
Keep getting "showaddform is not defined" when clicking on the anchor
which should change the css to visible.
JS****************************************
function showaddform() {
var mydiv = document.getElementById("addform");
mydiv.style.visibility = 'visible';
}
CSS************************************
#wrapper {
z-index: 0;
}
#addform {
visibility: hidden;
position: absolute;
top: 20%;
left: 50%;
border: 1px solid #000;
padding: 5px;
width: 350px;
height: 200px;
background: #dedede;
z-index: 1;
}
xhtml*************************************
<body>
<div id="wrapper">
<a href="default.asp" onclick="showaddform(); return false;">Add New
Attribute</a>
<div id="addform">
<form id="frmadd" method="post">
<SNIP />
<input type="submit" value="Add" />
</form>
</div>
</div>
</body>
More information about the thelist
mailing list