d7c4fce8b6543664a6dfef405715857996b61863
angie
  Fri Mar 10 14:47:53 2017 -0800
Ensure that Set and Clear buttons get distinct IDs.  fixes #19041

diff --git src/hg/lib/jsHelper.c src/hg/lib/jsHelper.c
index 3581d50..d6fc88d 100644
--- src/hg/lib/jsHelper.c
+++ src/hg/lib/jsHelper.c
@@ -175,31 +175,31 @@
 //TODO XSS filter
 safef(vertPosSet, sizeof(vertPosSet),
       "document.%s.jsh_pageVertPos.value = f_scrollTop(); ", form);
 return vertPosSet;
 }
 
 void jsMakeCheckboxGroupSetClearButton(char *buttonVar, boolean isSet)
 /* Make a button for setting or clearing a set of checkboxes with the same name.
  * Uses only javascript to change the checkboxes, no resubmit. */
 {
 char id[256];
 char javascript[256];
 safef(javascript, sizeof(javascript), "var list = document.getElementsByName('%s'); "
       "for (var ix = 0; ix < list.length; ix++) {list[ix].checked = %s}", buttonVar,
       isSet ? "true" : "false");
-safef(id, sizeof id, "%s_grpSetClrBut", buttonVar);
+safef(id, sizeof id, "%s_grp%sBut", buttonVar, isSet ? "Set" : "Clr");
 cgiMakeOnClickButton(id, javascript, isSet ? JS_SET_ALL_BUTTON_LABEL : JS_CLEAR_ALL_BUTTON_LABEL);
 }
 
 void jsMakeSetClearContainer()
 /* Begin a wrapper div with class setClearContainer, plus 'Set all' and 'Clear all' buttons.
  * This should be followed by a bunch of checkboxes, and then a call to jsEndContainer. */
 {
 puts("<div class=\"setClearContainer\">\n"
      "<input type=button value=\""JS_SET_ALL_BUTTON_LABEL"\" title=\"Check all checkboxes\">\n"
      "<input type=button value=\""JS_CLEAR_ALL_BUTTON_LABEL"\" title=\"Uncheck all checkboxes\">\n"
      "<br>"
      );
 }
 
 void jsEndContainer()