04-25-2009, 02:25 PM
|
#13 (permalink)
|
|
The Gregarious
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
|
Quote:
Originally Posted by Kalle
Alot more errors now, I think you will be better off using a framework to do the basics across browsers: document.write(countMe); -- that just prints the code thats in the function "countMe".
Your counter function seems wrong, as you name all of them 'checkbox', so something alon the lines of:
javascript Code:
function checkbox_count() { var retval = 0;
for(var x in document.getElementsByName('checkbox')) { if(x.checked) { ++retval; } }
return(retval); }
|
I know, I apologize, I just feel if I try to use any framework right now, I won't really learn the basics of JS.
Do you have your browser set to some kind of strict coding or something? I am viewing this in both IE and FF and it reveals no errors at all?
Heck, I'm even trying it out on Safari too and no errors pop up?
As for the output for "countMe", That I do I see...I was messing around with my code and it got late at night and I just left it there.....
|
|
|
|