fix A/R report
[freeside.git] / httemplate / elements / search-cust_main.html
index 317922d..ba6a479 100644 (file)
@@ -11,7 +11,7 @@ Example:
   );
 
 </%doc>
-<INPUT TYPE="hidden" NAME="<% $field %>" VALUE="<% $value %>">
+<INPUT TYPE="hidden" NAME="<% $field %>" ID="<% $field %>" VALUE="<% $value %>">
 
 <!-- some false laziness w/ misc/batch-cust_pay.html, though not as bad as i'd thought at first... -->
 
@@ -19,7 +19,7 @@ Example:
        NAME = "<% $field %>_search"
        ID   = "<% $field %>_search"
        SIZE = "32"
-       VALUE="<% $cust_main ? $cust_main->name : '(cust #, name or company)' %>"
+       VALUE="<% $cust_main ? $cust_main->name : '(cust #, name or company)' |h %>"
        onFocus="clearhint_<% $field %>_search(this);"
        onClick="clearhint_<% $field %>_search(this);"
        onChange="smart_<% $field %>_search(this);"
@@ -60,6 +60,9 @@ Example:
 
   function smart_<% $field %>_search(what) {
 
+    if ( <% $field %>_search_active )
+      return;
+
     var customer = what.value;
 
     if ( customer == 'searching...' || customer == ''