Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Drop down option box for categories looses focus

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-18-2011, 05:55 AM
 
Jeremy Smith Jeremy Smith is offline
 

Senior Member
  
Join Date: Jan 2009
Posts: 167
 

Question 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.
__________________
Version 4.1.11 on Linux (Fedora)
X-Cart Gold
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:54 AM.

   

 
X-Cart forums © 2001-2020