Quote:
Originally Posted by sradha
This code snippet is not clear to me...I didn't understand what is happening in the "for loop" within the script tag...what does 'field' refer to?
|
The parameter being passed is the group of elements with the name
list.
Within the scope of the form it could have been written
onClick="uncheckAll( list )">
Quote:
|
If I am writing javascript in a separate file how will I pass those arguments?
|
The form (or its element) would be better referenced by ID, but in its current state:
Code:
document.forms.myform.UnCheckAll.onclick = function(){ uncheckAll( this.form.list ); };