><input type="button" name="toggle_tracks" value="toggle tracks" >onclick=toggleAll( this.form ) class="search_input_submit"></input> ></form> Put your onclick handler in quotes. The whitespace inside toggleAll() is causing your troubles. If you put toggleAll() in quotes, it should work. Roger