
[!AjaxSearch? &ajaxSearch=`1` &AS_landing=`8`&extract=`1` &showMoreResults=`1`&AS_showResults=`1`!]
#ajaxSearch_output {
border: 1px solid #444;
padding: 10px;
background: #fff;
display: block;
height: auto;
width:345px;
vertical-align: top;
}<form id="ajaxSearch_form" action="index.php?id=182" method="post"> <label for="ajaxSearch_input"> <input id="ajaxSearch_input" type="text" name="search" value="Search here..." onfocus="this.value=(this.value=='Search here...')? '' : this.value ;" /> </label> <label for="ajaxSearch_submit"> <input id="ajaxSearch_submit" type="submit" name="sub" value="Search" /> </label> </form> <div id="ajaxSearch_output" style="opacity:0;"> </div>
<script type="text/javascript" src="assets/snippets/AjaxSearch/AjaxSearch.js"></script> <script type="text/javascript"> <!-- stripHtml = 1; stripSnip = 1; stripSnippets = 1; useAllWords = 0; searchStyle = 'partial'; minChars = 4; maxResults = 6; showMoreResults = 1; moreResultsPage = 8; as_language = 'english' extract = 0; liveSearch = 0; docgrp = ''; highlightResult = 1; --> </script> <script type="text/javascript" src="assets/snippets/AjaxSearch/AjaxSearch.js"></script> <script type="text/javascript"> <!-- stripHtml = 1; stripSnip = 1; stripSnippets = 1; useAllWords = 0; searchStyle = 'partial'; minChars = 4; maxResults = 6; showMoreResults = 1; moreResultsPage = 8; as_language = 'english' extract = 0; liveSearch = 0; docgrp = ''; highlightResult = 1; --> </script>
I am getting multiple inclusions of the script within my head section. This is preventing the script from working properly.
* Fix to original solution for FS#865 which causes registered scripts to be duplicated in cacheable pages by non-cacheable snippets.This fix is available in trunk, and will be released as part of an 0.9.6.1 patch release in the next week or two.
UPDATE: I should read my own previous posts!! I solved the problem with another site and completely forgot about it. http://modxcms.com/forums/index.php/topic,5357.msg55280.html#msg55280
Hopefully using [[ ]] rather than [! !] will help someone else out.
This discussion is closed to further replies. Keep calm and carry on.