X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fsearch-cust_main.html;h=ba6a479a66f9d14c9118196e10ab107f4f0b4da6;hb=4b67c9f8cfc9f944b7758e7e69ac1f9f188ffa47;hp=23c4369e857e2363b268d0a4492aa298bee0fc90;hpb=548bde0209edab634e5b2ea919e4a2096607d2d0;p=freeside.git
diff --git a/httemplate/elements/search-cust_main.html b/httemplate/elements/search-cust_main.html
index 23c4369e8..ba6a479a6 100644
--- a/httemplate/elements/search-cust_main.html
+++ b/httemplate/elements/search-cust_main.html
@@ -11,7 +11,7 @@ Example:
);
%doc>
-
+
@@ -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);"
@@ -56,8 +56,13 @@ Example:
}
+ var <% $field %>_search_active = false;
+
function smart_<% $field %>_search(what) {
+ if ( <% $field %>_search_active )
+ return;
+
var customer = what.value;
if ( customer == 'searching...' || customer == ''
@@ -128,8 +133,12 @@ Example:
}
+ <% $field %>_search_active = false;
+
}
+ <% $field %>_search_active = true;
+
smart_search( customer, <% $field %>_search_update );