View Single Post
Old 04-23-2009, 05:28 PM   #19 (permalink)
allworknoplay
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

Hey guys, quick question, this goes a little back when Salathe suggested to use onLoad in the Body tag...

Here's what I currently have and it works...

shortened code:

Code:
<body>
<div><input type="checkbox" name="checkbox" value="checkbox" /></div>
<div><input type="checkbox" name="checkbox" value="checkbox"  /></div>
<div><input type="checkbox" name="checkbox" value="checkbox"  /></div>
<div><input type="radio" name="radio"  /></div>
<div><input type="radio" name="radio"  /></div>
<div><input type="radio" name="radio"  /></div>

<script type="text/javascript">
<!--
showCount();
// -->
</script>

</body>
I move the function to be an onLoad event in the BODY tag and it works too...is this considered best practice?

Code:
<body onLoad="showCount();">
<div><input type="checkbox" name="checkbox" value="checkbox" /></div>
<div><input type="checkbox" name="checkbox" value="checkbox"  /></div>
<div><input type="checkbox" name="checkbox" value="checkbox"  /></div>
<div><input type="radio" name="radio"  /></div>
<div><input type="radio" name="radio"  /></div>
<div><input type="radio" name="radio"  /></div>

</body>
allworknoplay is offline  
Reply With Quote