4ea1cf8aafc507f79cb6cb779e4ffb6aa6adc43f
angie
  Thu Mar 4 17:48:50 2021 -0800
Added cgiMakeOnClickButtonWithMsg for a *non*-submit button with both mouseover title and javascript.

diff --git src/lib/cheapcgi.c src/lib/cheapcgi.c
index b6e6104..9d96a3c 100644
--- src/lib/cheapcgi.c
+++ src/lib/cheapcgi.c
@@ -1524,37 +1524,46 @@
 cgiMakeSubmitButtonMaybePressed(name, value, NULL, command, FALSE);
 }
 
 void cgiMakeButtonWithOnClick(char *name, char *value, char *msg, char *onClick)
 /* Make 'submit' type button, with onclick javascript */
 {
 cgiMakeSubmitButtonMaybePressed(name, value, msg, onClick, FALSE);
 }
 
 void cgiMakeButton(char *name, char *value)
 /* Make 'submit' type button */
 {
 cgiMakeButtonWithMsg(name, value, NULL);
 }
 
-void cgiMakeOnClickButton(char *id, char *command, char *value)
-/* Make button with client side onClick javascript. */
+void cgiMakeOnClickButtonWithMsg(char *id, char *command, char *value, char *msg)
+/* Make button (not submit) with client side onClick javascript. Display msg on mouseover. */
 {
-printf("<INPUT TYPE='button' id='%s' VALUE=\"%s\">", id, value);
+printf("<input type='button' id='%s' value=\"%s\"", id, value);
+if (msg)
+    printf(" title='%s'", msg);
+printf(">");
 jsOnEventById("click", id, command);
 }
 
+void cgiMakeOnClickButton(char *id, char *command, char *value)
+/* Make button (not submit) with client side onClick javascript. */
+{
+cgiMakeOnClickButtonWithMsg(id, command, value, NULL);
+}
+
 void cgiMakeOptionalButton(char *name, char *value, boolean disabled)
 /* Make 'submit' type button that can be disabled. */
 {
 printf("<INPUT TYPE=SUBMIT NAME=\"%s\" VALUE=\"%s\"", name, value);
 if (disabled)
     printf(" DISABLED");
 printf(">");
 }
 
 void cgiMakeFileEntry(char *name)
 /* Make file entry box/browser */
 {
     printf("<INPUT TYPE=FILE NAME=\"%s\">", name);
 }