Products     Magento Extension     PCI-Shopping-Carts     Templates       CRELoaded     WordPress Modules     osCommerce Modules       osCommerce Addons       osCommerce Features       osCommerce Management       Payment Modules     CRELoaded Modules       CRE Loaded Addons       CRE Loaded Features       CRE Loaded Management       Payment Modules       CRELoaded Services
Free Stuff
Customization
Templates
Compare Products
You have no items to compare.
Affiliate Info
Affiliate Program FAQ
Affiliate Log In
Recent Orders
Hot Keywords: Order Notification, Order Search, Coupon, Flash Board, Compare, Floating Message, Tracking, Moneris, RSS, Visitor Filter

  AJAX Search Suggest

The following osCommerce contribution is a free Opensource code originated from official osCommerce website and provided for your reference only, you may download the original contribution file(s) and install it on your own; or you may request a Paid Installation Service from Agents Of Power; Agents Of Power does the "AS IS" installation on your website, we do not guarantee it will work properly on your website. Extra Paid service is available for repairing the problem from the original contribution or from your website.
nicola_fumagalli posted this fix on the forum, thought i'd add it.

IE8 dont work on table and getelements..

i have reconvert all with div and now work on all IE and firefox...

so the search_suggest.xml must be:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD Xhtml 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
/**
* osCommerce: XSLT Example for OSCFieldSuggest JS class
*
* File: includes/search_suggest.xsl
* Version: 1.0
* Date: 2007-03-28 17:49
* Author: Timo Kiefer - timo.kiefer_(at)_kmcs.de
* Organisation: KMCS - www.kmcs.de
* Licence: General Public Licence 2.0
*/
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="UTF-8" indent="no" method="html" doctype-public="-//W3C//DTD Xhtml 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<xsl:template match="/">
<xsl:for-each select="response/suggestlist/item"><div style="cursor: pointer; width:300px; opacity: 0.9; filter: alpha(opacity=90); background-color: #FFFFFF; border-collapse: collapse; border-top: 1px solid #C6C6C6; padding: 1px; color:#000000; font-size: 8pt; font-family: Verdana;" onclick="window.location.href = '{url}';" onmouseover="this.style.backgroundColor = '#005388'; this.style.color = '#FFFFFF';" onmouseout="this.style.backgroundColor = '#FFFFFF'; this.style.color = '#000000';"><xsl:value-of select="name"/></div></xsl:for-each>
</xsl:template>
</xsl:stylesheet>

File includes these IE 6, 7, & 8 fix comments only (not full package). Hope this helps!

See it in action at http://www.horticulturesource.com/
Update file includes/class.OSCFieldSuggest.js around lines 31 to 55:

base.createXmlHttpRequest = function() {
var requestInstance = false;
if (window.XMLHttpRequest) { // New IE, Firefox, Mozilla, etc.
requestInstance = new XMLHttpRequest();
if (requestInstance.overrideMimeType) {
requestInstance.overrideMimeType('text/xml');
}
} else if (window.ActiveXObject) { // Old IE
try{ // first try v 6
requestInstance = new ActiveXObject("MSXML2.XMLHTTP.6.0");
} catch (e) {
try { // then try the others...
requestInstance = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try { // last chance...
requestInstance = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
}
if(!requestInstance) {
alert("Sorry, your browser does not support AJAX. Please consider upgrading or switching browsers.");
}
return(requestInstance);
};


The order in which your OSCFieldSuggest function call is inserted needs to be the order Robert972 said:

"you dont need all of my table code... you can put the fields where you like by using:
********

<?php
echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get');
?>

<?php
echo tep_draw_input_field('keywords', '', 'id="txtSearch" size="40" autocomplete="off" maxlength="40" style="width:266px:font-size:13px;height:22px"')." ";
echo tep_hide_session_id();
?>

<script language="JavaScript" type="text/javascript" src="includes/class.OSCFieldSuggest.js"></script>
<script language="JavaScript" type="text/javascript">
/*<![CDATA[*/
//Attention!!! put always this code above the HTML code of your field!!!
var oscSearchSuggest = new OSCFieldSuggest('txtSearch', 'includes/search_suggest.xsl', 'searchsuggest.php');
/*]]>*/
</script>

<?php
echo tep_image_submit('button_go.gif', 'Search');
?>

<?php
echo '<a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>Advanced Search</b></a>';
?>

*********
they must be in that order, wherever you put them."

File includes just these comments (not full package). Hope this helps!
See it in action at <a href="http://www.horticulturesource.com/">http://www.horticulturesource.com/</a> - http://www.horticulturesource.com/
Didn't see a support forum so thought I'd post an open question.

Does anyone know why this contrib doesnt work with Internet Explorere (IE 6 or IE 7 tested, both result in page errors).

! Error on Page
Line : 67
Char: 9
Error: The stylesheet does not contain a document element. The stylesheet may be empty, or it may not be a well-formed XML document.
Code: 0
URL: http://mydomain.com/catalog/advanced_search_result.php?keywords=test

(attachement contains this text)
   Posted on: 02/03/2009     See contribution details Request Installation with Paid service