From efd634ac1546c45cd299ec9040997f7663deddd7 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Mon, 16 Jan 2006 16:31:49 +0000 Subject: - Fix Safari alert when no autocomplete matches are returned. --- misc/autocomplete.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'misc') diff --git a/misc/autocomplete.js b/misc/autocomplete.js index 0f4eee475..6cb72518c 100644 --- a/misc/autocomplete.js +++ b/misc/autocomplete.js @@ -249,7 +249,8 @@ ACDB.prototype.search = function(searchString) { * HTTP callback function. Passes suggestions to the autocomplete object */ ACDB.prototype.receive = function(string, xmlhttp, acdb) { - if (xmlhttp.status != 200) { + // Note: Safari returns 'undefined' status if the request returns no data. + if (xmlhttp.status != 200 && typeof xmlhttp.status != 'undefined') { removeClass(acdb.owner.input, 'throbbing'); return alert('An HTTP error '+ xmlhttp.status +' occured.\n'+ acdb.uri); } -- cgit v1.2.3