vasekcekal Posted February 12, 2011 Share Posted February 12, 2011 I have a problem with my search form. It isn't in one row, but I need it in one row. How I can made it? In code is: <!-- Block search module TOP --> <form method="get" action="{$link->getPageLink('search.php')}" id="searchbox"> <!-- image on background --> aaa <input type="hidden" name="orderby" value="position" /> <input type="hidden" name="orderway" value="desc" /> <input class="search_query" type="text" id="search_query_top" name="search_query" value="{if isset($smarty.get.search_query)}{$smarty.get.search_query|htmlentities:$ENT_QUOTES:'utf-8'|stripslashes}{/if}" /> <input type="submit" name="submit_search" value="{l s='Search' mod='blocksearch'}" class="button" /> </form> {if $instantsearch} [removed] // <![CDATA[ {literal} function tryToCloseInstantSearch() { if ($('#old_center_column').length > 0) { $('#center_column').remove(); $('#old_center_column').attr('id', 'center_column'); return false; } } instantSearchQueries = new Array(); function stopInstantSearchQueries(){ for(i=0;i instantSearchQueries[i].abort(); } instantSearchQueries = new Array(); } $("#search_query_top").keyup(function(){ if($(this).val().length > 0){ stopInstantSearchQueries(); instantSearchQuery = $.ajax({ url: '{/literal}{if $search_ssl == 1}{$link->getPageLink('search.php', true)}{else}{$link->getPageLink('search.php')}{/if}{literal}', data: 'instantSearch=1&id;_lang={/literal}{$cookie->id_lang}{literal}&q;='+$(this).val(), dataType: 'html', success: function(data){ if($("#search_query_top").val().length > 0) { tryToCloseInstantSearch(); $('#center_column').attr('id', 'old_center_column'); $('#old_center_column').after(''+data+''); $("#instant_search_results a.close").click(function() { $("#search_query_top").val(''); return tryToCloseInstantSearch(); }); return false; } else tryToCloseInstantSearch(); } }); instantSearchQueries.push(instantSearchQuery); } else tryToCloseInstantSearch(); }); // ]]> {/literal} [removed] {/if} {if $ajaxsearch} [removed] // <![CDATA[ {literal} $('document').ready( function() { $("#search_query_top") .autocomplete( '{/literal}{if $search_ssl == 1}{$link->getPageLink('search.php', true)}{else}{$link->getPageLink('search.php')}{/if}{literal}', { minChars: 3, max: 10, width: 500, selectFirst: false, scroll: false, dataType: "json", formatItem: function(data, i, max, value, term) { return value; }, parse: function(data) { var mytab = new Array(); for (var i = 0; i < data.length; i++) mytab[mytab.length] = { data: data[i], value: data[i].cname + ' > ' + data[i].pname }; return mytab; }, extraParams: { ajaxSearch: 1, id_lang: {/literal}{$cookie->id_lang}{literal} } } ) .result(function(event, data, formatted) { $('#search_query_top').val(data.pname); document.location.href = data.product_link; }) }); {/literal} // ]]> [removed] {/if} <!-- /Block search module TOP --> Please, help me, thank you very much in advance Link to comment Share on other sites More sharing options...
vasekcekal Posted February 12, 2011 Author Share Posted February 12, 2011 http://presta.atv-rakovnik.cz/cs/New version, but still now in one row. Same code.Can somebody help me? ____________________________EDIT:Problem was in button style, I made new button, and now is all OK Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now