X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Drop down option box for categories looses focus (https://forum.x-cart.com/showthread.php?t=58119)

Jeremy Smith 02-18-2011 05:55 AM

Drop down option box for categories looses focus
 
I am having some problems getting X Cart to use a 2 level category select box.

I have 2 of them, one for root categories and then one for sub categories.

I have the following in my template file:

HTML Code:

{capture name=menu}
{if $active_modules.Fancy_Categories ne ""}
{assign var="fc_cellpadding" value="0"}
{else}
{if $config.General.root_categories eq "Y"}


<form name="catForm">Manufacturer:
<select name="rootCat" onChange="window.location=document.catForm.rootCat.options[document.catForm.rootCat.selectedIndex].value">



<option value="">Please select: </option>

{foreach from=$categories item=c}

<option value="home.php?cat={$c.categoryid}">{$c.category}</option>

{/foreach}

</select>

Model:

<select id="subCat" name="subCat">

<option value="#"></option>

{foreach from=$subcategories item=c key=catid}
<option value="home.php?cat={$catid}">{$c.category}</option>
{/foreach}

</select>

<input type="button" name="go" value="Select" onClick="window.location=document.catForm.subCat.options[document.catForm.subCat.selectedIndex].value">

</form>

{else}

{/if}
{/if}
{/capture}


Is there anyway when someone was to select say a root category, for example one of ours is Brother (asin the manufacturer for ink or laser cartridges).

Retaining that selection when the sub categories list is displayed?

Then when they go to select a sub category, I don't know a Brother printer of some sorts.

It then retains both values, is this possible at all?

It's just at the moment its loosing focus and displaying an empty drop down box value.

Any helps appreciated,
Jeremy.


All times are GMT -8. The time now is 04:31 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.