<![CDATA[ AdvSearch with ajax and livesearch - My Forums]]> https://forums.modx.com/thread/?thread=83992 <![CDATA[AdvSearch with ajax and livesearch]]> https://forums.modx.com/thread/83992/advsearch-with-ajax-and-livesearch#dis-post-463574 I need to search in TV therefore I cannot use SimpleSearch. AdvSearch in non-ajaxmode works ok, but I want to show live searched result in float window under search form.
[[!AdvSearchForm? &landing=`81` &tpl=`food.AdvSearchForm` &addJQuery=`0` &help=`0` &clearDefault=`1` &withAjax=`1`
    &ajaxResultsId=`364` &addJs=`0` &addCSS=`0` &liveSearch=`1`]]

Adding JS is disabled because even with 1 it doesnt paste any code. So I pasted it manually.
On page 364 I have empty template with call:
[[!AdvSearch? &hideContainers=`1` &fields=`pagetitle` &hideMenu=`0` &includeTVs=`vyrobce,popis,main-img` &withFields=`pagetitle` &withTVs=`vyrobce,popis` &perPage=`20` &sortby=`pagetitle[ASC]` &minChars=`1` &ids=`[[GetOnlyChildren? &parent=`2` &depth=`3`]]`  &withAjax=`1`  ]]


But it seems no js is loaded because it always return result to page 81...
I have no idea what I am doing wrong...]]>
kudykam Apr 19, 2013, 07:12 AM https://forums.modx.com/thread/83992/advsearch-with-ajax-and-livesearch#dis-post-463574
<![CDATA[Re: AdvSearch with ajax and livesearch]]> https://forums.modx.com/thread/83992/advsearch-with-ajax-and-livesearch#dis-post-548155 Quote from: kudykam at Apr 19, 2013, 07:12 AM
Hi,
I need to search in TV therefore I cannot use SimpleSearch. AdvSearch in non-ajaxmode works ok, but I want to show live searched result in float window under search form.
[[!AdvSearchForm? &landing=`81` &tpl=`food.AdvSearchForm` &addJQuery=`0` &help=`0` &clearDefault=`1` &withAjax=`1`
    &ajaxResultsId=`364` &addJs=`0` &addCSS=`0` &liveSearch=`1`]]

Adding JS is disabled because even with 1 it doesnt paste any code. So I pasted it manually.
On page 364 I have empty template with call:
[[!AdvSearch? &hideContainers=`1` &fields=`pagetitle` &hideMenu=`0` &includeTVs=`vyrobce,popis,main-img` &withFields=`pagetitle` &withTVs=`vyrobce,popis` &perPage=`20` &sortby=`pagetitle[ASC]` &minChars=`1` &ids=`[[GetOnlyChildren? &parent=`2` &depth=`3`]]`  &withAjax=`1`  ]]


But it seems no js is loaded because it always return result to page 81...
I have no idea what I am doing wrong...



Does it work whitout JS?
I copied the code and I changed Ids and It does not Work...
]]>
zara2ua Jan 18, 2017, 04:11 PM https://forums.modx.com/thread/83992/advsearch-with-ajax-and-livesearch#dis-post-548155
<![CDATA[Re: AdvSearch with ajax and livesearch]]> https://forums.modx.com/thread/83992/advsearch-with-ajax-and-livesearch#dis-post-548154 I added this in my Template, so It does not work.
The mistake is the following
]]>
zara2ua Jan 18, 2017, 04:08 PM https://forums.modx.com/thread/83992/advsearch-with-ajax-and-livesearch#dis-post-548154
<![CDATA[Re: AdvSearch with ajax and livesearch (Best Answer)]]> https://forums.modx.com/thread/83992/advsearch-with-ajax-and-livesearch#dis-post-463836 Under embeded javascript in head section, have to be this code:
<script type="text/javascript">
//<![CDATA[
advsea[advsea.length]='{"asid":"as0","hid":"364"}';
//]]>
</script>


where asid is name of search result (see rtfm) and hid is landing page...]]>
kudykam Apr 22, 2013, 03:32 AM https://forums.modx.com/thread/83992/advsearch-with-ajax-and-livesearch#dis-post-463836