Wgrałem skrypt do oscommerce do auto uzupełniania/podpowiadania przy wpisywaniu do wyszukiwarki danej frazy. Wszystko działa OK ale nie ma możliwości strzałkami schodzić w dół. Lista wyników się rozwija ładnie i jedynie myszką można sobie wybrać. Natomiast z klawiatury strzałka w dół i w górę nie reaguje. Myślę że to w tym pliku tego skryptu trzeba coś dodać. Jakaś podpowiedź co i ewentualnie jak ? :]
Kod
<?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">
<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 align="left" style="
cursor: pointer;
width: 300px;
opacity: 0.6;
filter: alpha(opacity=60);
background-color: #E9E9E9;
padding: 4px;
margin: 2px;
color:#000000;
font-size: 7pt;
font-family: Verdana;"
onclick="window.location.href = '{url}';"
onmouseover="this.style.backgroundColor = '#A3A3A3'; this.style.color = '#E9E9E9';"
onmouseout="this.style.backgroundColor = '#E9E9E9'; this.style.color = '#000000';">
<xsl:value-of select="name"/>
</div>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
<!DOCTYPE html PUBLIC "-//W3C//DTD Xhtml 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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 align="left" style="
cursor: pointer;
width: 300px;
opacity: 0.6;
filter: alpha(opacity=60);
background-color: #E9E9E9;
padding: 4px;
margin: 2px;
color:#000000;
font-size: 7pt;
font-family: Verdana;"
onclick="window.location.href = '{url}';"
onmouseover="this.style.backgroundColor = '#A3A3A3'; this.style.color = '#E9E9E9';"
onmouseout="this.style.backgroundColor = '#E9E9E9'; this.style.color = '#000000';">
<xsl:value-of select="name"/>
</div>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>