convert links for Dynamic Navigation to dropdown list

18 views
Skip to first unread message

turtle

unread,
May 23, 2012, 3:13:14 PM5/23/12
to Google Search Appliance/Google Mini - Google Search Appliance/Google Mini
Does anyone have an exmple of modified xslt to convert links in for
dynamic navigation to dropdown list?

I get it partially working, but still have issues. Here are the
changes I've made:

1. Add a select box in <xsl:template match="PMT">

<xsl:template match="PMT">
....
<xsl:variable name="selectBoxName"><xsl:value-of select="@DN"/></
xsl:variable>
<ul class="dn-attr">
<li class="dn-attr-h"><xsl:value-of select="@DN"/></li>
<li>
<select name="selectBox_{$selectBoxName}"
onchange="javascript:void(window.location=this.value);">

....
2. Modified the hyper link in <xsl:template match="PV"
mode="construct"> to options.
....
<option value="http://search.edwardjones.com/search?{$qurl}">
<xsl:if test="../@IR != 1">
<xsl:attribute name="title"><xsl:value-of
select="$dispval"
disable-output-escaping="no"/></xsl:attribute>
</xsl:if>
<xsl:value-of select="$dispval" disable-output-
escaping="yes"/>
<span style="color: #777;"><xsl:value-of
select="$dispcount"
disable-output-escaping="yes"/></span>
</option>

The problem I'm having is that one a value is selected from a dropdown
list, the select box becomes empty. In another words, it loses all the
values for the select box.

What do I miss here? What do I need in my javascript function? Do I
need to generate the options for the dropdown list dynamically in the
javascript function?

Thanks for your help in advance.

Reply all
Reply to author
Forward
0 new messages