Ok, so I can't use "return false" in the <script> section.
Since I'm pretty new to JavaScript, can you explain the differences / benefits of these two scripts
#1
Code:
<script type="text/javascript">
var z = 10;
function ShowHide(id) {
document.getElementById(id).style.display = "block";
document.getElementById(id).style.zIndex = z++;
}
</script>
#2
Code:
<script type="text/javascript">
var z = 10;
function ShowHide(id) {
var k = document.getElementById(id).style;
k.display = "block";
k.zIndex = parseInt(k.zIndex) + 1;
return false;
}
</script>
Bookmarks