Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with a jump menu for only one catagory

Status
Not open for further replies.

asweeney

Programmer
Sep 3, 2008
4
US
Please look at the left menu here
I only want a drop down for the catagory of Browse by Brand and I cannot seem to get it to work. Here is the code for that section. Can any one look and make a suggestion. I did not write the original code I am trying to adjust it to what I need for this shopping cart.

<!-- BROWSE PRODUCTS -->
<xsl:if test="boolean($WSMenuStyle='Standard')">
<table id="menu">
<tr>
<td class="tblhead">Browse</td>
</tr>

<xsl:for-each select="IAMStoreMenu/Category">
<tr>
<td > <xsl:param name="myLink" select="./Name"/>

<a href="/CategoryProductList.jsp?cat={url:encode(string($myLink),string('UTF-8'))}">
<strong>
<xsl:value-of select="./Name"/> </strong></a> </td>
</tr>

<xsl:for-each select="./Category">
<tr>
<td >
<xsl:param name="mySubLink" select="./Name"/>
- <a href="/CategoryProductList.jsp?cat={url:encode(string(../Name),string('UTF-8'))}:{url:encode(string($mySubLink),string('UTF-8'))}">

<xsl:value-of select="./Name"/>
</a> </td>
</tr>
</xsl:for-each>
<xsl:if test="boolean(./Category != 'BROWSE BY BRAND')">
<tr><td>
<form>
<select name="cat" id="cat" onchange="MM_jumpMenu('parent',this,0)">
<xsl:for-each select="./Category">
<xsl:param name="mySubLink" select="./Name"/>
<option value="/CategoryProductList.jsp?cat={url:encode(string(../Name),string('UTF-8'))}:{url:encode(string($mySubLink),string('UTF-8'))}"> <xsl:value-of select="./Name"/> </option>
</xsl:for-each>
</select>
</form>
</td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</xsl:if>
 
>I only want a drop down for the catagory of Browse by Brand
><xsl:if test="boolean(./Category != 'BROWSE BY BRAND')">
Maybe change the above to this.
[tt]<xsl:if test="boolean(./Category [highlight]=[/highlight] 'BROWSE BY BRAND')">[/tt]
 
Don't work... maybe. I don't what you have. What have changed then? show evidence?
 
I made that change as you suggested (even though I tried it before..it makes total sense) and it didn't make the correction...see here again now there are no drop downs showing.
 
Do you think maybe it is in here that is causing the issue:

<select name="cat" id="cat" onchange="MM_jumpMenu('parent',this,0)">
<xsl:for-each select="./Category">
<xsl:param name="mySubLink" select="./Name"/>

I think make that xsl:for-each select="./category" is what is adding the dropdown for all of the catagories...maybe that needs to ='Browse by Brands'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top