We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27843
    • 170 Posts
    Hi community,

    I have big problem and I have tried everythink. I don’t know how to remove blank space, which is on the top of every ajax search result (div’s with class="AS_ajax_result"). I’m optimizing page for all browsers and this problem occurs in all browser.

    This is the page, where the problem is: http://pronails.ifmedia.eu/ try find nai and look at Firebug, as you can see, on the top of every ajax result is some type of blank space, but as you can see last item (it’s more results link - AS_ajax_more) haven’t this blank on the top
    My versions are MODx 1.0.2, AjaxSearch 1.8.4 and AjaxSearch call is:
    <br /><div class="box1"><br />    [!AjaxSearch? &language=`slovak-utf8` &addJscript=`1` &extract=`0` &ajaxSearch=`1` &ajaxMax=`10` &showMoreResults=`1` &moreResultsPage=`37`!]<br />    <!--search_terms--><br /></div><br />


    I have tried many combinations of extracts, also I have looked to the template which is used to render ajax output and there aren’t any "\n" or
    , even on the end of the template ajaxSearch\templates\ajaxResult.tpl.html isn’t blank line.
    The code which generates ajax results into the template ajaxSearch\templates\ajaxResults.tpl.html doesn’t contain any blank spaces (I have cut only part which is used for render results), it’s placeholder [+as.listResults+]
    <br />...<br />[+as.noResults:is=`1`:then=`<br />  <div class="[+as.noResultClass+]"><br />    [+as.noResultText+]<br />  </div><br />`:else=`<br />[b][+as.listResults+][/b]<br />`+]<br />[+as.moreResults:is=`1`:then=`<br />....<br />


    I will be very grateful for any advice and suggestions.

    Thank you
      • 23510
      • 168 Posts
      I’ve looked through your CSS and couldn’t find anything that is causing the space so it is possible the space is being applied dynamically i.e. through javascript?

      the quick fix is to apply a margin-top: -16px to the inner divs.
        • 27843
        • 170 Posts
        Quote from: pixelstation at Feb 17, 2010, 06:48 PM

        I’ve looked through your CSS and couldn’t find anything that is causing the space so it is possible the space is being applied dynamically i.e. through javascript?

        I don’t know, this should know author of the AjaxSearch, In the worst case i will have to examine the source code of AjaxSearch v1.8.4, because this bug doesn’t exit in previous versions.

        Quote from: pixelstation at Feb 17, 2010, 06:48 PM

        the quick fix is to apply a margin-top: -16px to the inner divs.

        I know about this fix and I’m using it on all other sites where is AjaxSearch v1.8.4, but itsn’t a solution.

        Other thing is, that the same blank space is inserted before main form tag with id="ajaxSearch_form" and it cause many problems, when i want to optimize pages for all major browser on the marketplace.
          • 4041
          • 788 Posts
          Briefly glancing through the version which ships with evo 1.0.2, I notice all the files in the assets/snippets/ajaxSearch/templates folder have BOM characters at the beginning of the files. ()

          I don’t know if this could cause the space issue, but the version that ships with 0.9.6.3 does not have these characters. Remove them and see if that helps.
            xforum
            http://frsbuilders.net (under construction) forum for evolution
            • 27843
            • 170 Posts
            Quote from: Breezer at Feb 18, 2010, 10:26 AM

            I notice all the files in the assets/snippets/ajaxSearch/templates folder have BOM characters at the beginning of the files. ()

            Hi Breezer,

            you are right, problems cause this BOM char
              • 29902
              • 72 Posts
              Quote from: Breezer at Feb 18, 2010, 10:26 AM

              Briefly glancing through the version which ships with evo 1.0.2, I notice all the files in the assets/snippets/ajaxSearch/templates folder have BOM characters at the beginning of the files. ()

              I don’t know if this could cause the space issue, but the version that ships with 0.9.6.3 does not have these characters. Remove them and see if that helps.

              How do you remove the BOM characters when you dont see them? I see the weird space on my page and a little dot in the html-source, but in the code I cannot see it.
                ...I believed it was Friday...
                • 27843
                • 170 Posts
                Quote from: thorjarle at Mar 17, 2010, 04:45 AM

                How do you remove the BOM characters when you dont see them? I see the weird space on my page and a little dot in the html-source, but in the code I cannot see it.

                I have used pspad, i have converted every template to utf-8 and bom char was removed, when i open this file in hex editor e.g. in pspad’s hex editor (with bom char) at the begin of the file you can see bom char
                  • 32453
                  • 3 Posts
                  THANK YOU SO MUCH! This is the fix I was looking for, just to be clear for others who experience this issue this is what I did:
                  1. Downloaded and installed Notepad++ (just search at google for this program)
                  2. Opened the file ajaxsearch/templates/layout.tpl.html in Notepad++
                  3. In Notepad++ I click on "Encoding" and then selected "Encode in UTF-8 without BOM"
                  4. I saved this file over the original layout.tpl.html file and then uploaded the new file to the server into the
                  assets/snippets/ajaxSearch/templates/

                  I Love ModX! thanks again for the help