Código Javascript:
Ver original
<script type="text/javascript"> function anadir(obj) { if (obj.focus) obj.form.search_query.value += obj.value; } </script> <script type="text/javascript"> function eliminar(obj) { if (obj.blur) obj.form.search_query.value =""; } </script>
Código HTML:
Ver original
<div id="search_block_left" class="block exclusive"> <form name="formulario" method="post" action="{$link->getPageLink('search', true)}" id="searchbox"> <p class="block_content"> <input type="hidden" name="orderby" value="position" /> <input type="hidden" name="controller" value="search" /> <input type="hidden" name="orderway" value="desc" /> <!-- Selectores Personal Shoppers --> <div> <input type="radio" name="search_query1" value="moreno " onfocus="anadir(this)" onblur="eliminar(this)" />Moreno <input type="radio" name="search_query1" value="Rubio " onfocus="anadir(this)" onblur="eliminar(this)"/>Rubio </div> <div> <input type="radio" name="search_query2" value="con curvas " onfocus="anadir(this)" onblur="eliminar(this)"/>con Curvas <input type="radio" name="search_query2" value="atletica " onfocus="anadir(this)" onblur="eliminar(this)"/>Atlética </div> <div> <input type="radio" name="search_query3" value="atrevida " onfocus="anadir(this)" onblur="eliminar(this)"/>Atrevida <input type="radio" name="search_query3" value="elegante " onfocus="anadir(this)" onblur="eliminar(this)"/>Elegante </div> <input class="search_query" type="text" id="search_query_block" name="search_query" value="" /> <input type="submit" id="search_button" class="button_mini" value="{l s='Go!' mod='blocksearch'}" /> </p> </form> </div>
Como puedo conseguir que sólo me elimine el valor del compañero de grupo y no los de otros grupos?