I have a search engine that depending on how you fill it, a button or another should appear, the idea is that if I do not enter one of the filters / fields of the search engine, the search button will go black, I'll leave it as I did:
<div class="searchsubmit-wrapper">
<div class="submit-main-button">
<div id="divevento">
{if $selectedCat == false}
Selecciona almenos dos filtros
{else}
<div class="searchsubmit2">{__ 'BUSCAR'}</div>
<input type="submit" value="{__ 'BUSCAR'}" class="searchsubmit">
{/if}
</div>
</div>
</div>
and here I leave the variable:
{var $selectedCat = isset($_REQUEST['category']) && $_REQUEST['category'] != "" ? $_REQUEST['category'] : ''}
if selectedCat
has no value, I want the "select two filters" message to appear. Once it works, I'll change it to the submit but it will be gray and not selectable.
and if selectedCat has value I want the submit button to appear fine.
So far everything goes well, the problem is that I need to update the value of this variable without having to reload the page and I have been looking for and trying to try things but I think that I do not approach what I want and I do not have idea of ajax .