Andrew Boyson / web

Dependents:   oldheating gps motorhome heating

Revision:
84:4ed751de613e
Parent:
77:4689596a2f3f
Child:
86:f3c9beec4ee7
diff -r 0d956edd55b7 -r 4ed751de613e page/page.c
--- a/page/page.c	Sat Apr 06 11:21:14 2019 +0000
+++ b/page/page.c	Sat Apr 06 11:32:45 2019 +0000
@@ -187,6 +187,13 @@
     HttpAddF   ("  <input type='text' style='width:%.1fem;' id='%s' onchange='AjaxRequest(\"%s=\" + this.value)'>\r\n", inputwidth, id, name);
     HttpAddText("</div>\r\n");
 }
+void PageAddAjaxInputSuffix(char* label, float inputwidth, char* id, char* name, char* suffix)
+{
+    HttpAddText("<div class='line'>\r\n");
+    HttpAddF   ("  <div>%s</div>\r\n", label);
+    HttpAddF   ("  <input type='text' style='width:%.1fem;' id='%s' onchange='AjaxRequest(\"%s=\" + this.value)'>%s\r\n", inputwidth, id, name, suffix);
+    HttpAddText("</div>\r\n");
+}
 void PageAddAjaxLabelled(char* label, char* id)
 {
     HttpAddText("<div class='line'>\r\n");