I would do something like this to make it less obtrusive:
Code:
<script type="text/javascript"><!--
function flipform(element)
{
theForm = document.getElementById(element);
if (theForm.className != "sub")
{
theForm.className = "sub";
}
else
{
theForm.className = "suboff";
}
}
//--></script>
Then you can just style the suboff and sub with normal css instead of using javascript which may not be enabled.
wawa-
Great script! It's pretty compact, and easy to modify. I just might use that one sometime (or a modification of it).
darkfate Wrote:I would do something like this to make it less obtrusive:
code...
Then you can just style the suboff and sub with normal css instead of using javascript which may not be enabled.
darkfate-
I'm not sure why your script has an advantage over wawa's. Unless I'm not understanding, it seems like
both scripts use JavaScript. So if JavaScript were turned off, neither would work. Could you explain its advantages a bit more? It seems like wawa's would be easier to use since it requires no additional CSS.
Well, I figure that it's less code in javascript. Having that separation seems logical to me.