Whilst a great many customers are happy not to have autosuggest, some demand it.
In a recent design which I developed, the autosuggest did not seem to work on my modified search box.
Here is the box:
The icon used is here --> (it's white!)
At first it looked like the autosuggest was not working, it could not be seen.
In the event, the autosuggest WAS there all along but it was displaced to the right of the screen. The actinicsearch.js script had appended an inline style of left: 1290px; which of course pushed it right off the screen.
The difference between my design and the default serach box is that my search div is position:relative, so the position becomes 1290px to the right of the search box.
The top position seems to be from the top of the page so SD is positioning the autosuggest relative to the whole page; EXCEPT: the default site is 970px SO SD must be calculating the position from the top left of the monitor display. I can't over ride the styles with an expression in the head of the page because they are inline so the only alternative is to edit actinicsearch.js thus:
Line 246:
var posX = findPosX(thisSearch);
var posY = findPosY(thisSearch);
I changed to:
// var posX = findPosX(thisSearch);
// var posY = findPosY(thisSearch);
var posX = '0';
var posY = '0';
and the autosuggest is perfectly positioned below the search box.
But I can't work out where SD is getting the PosX from. Moreover, there appears to be no instance of thisSearch in the default site.
The fix works but it is annoying because it will need reapplying when the site is upgraded.
This is just posted in case anyone else has this issue or in case you fancy a nice search box to which you are, of course, welcome!
Thanks
In a recent design which I developed, the autosuggest did not seem to work on my modified search box.
Here is the box:
Code:
<div id="quick-search"> <form name="simplesearch" method="get" action="<actinic:variable name="OnlineScriptURL" value="Search Script URL" />"> <fieldset> <actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e"> Hidden field when in trial mode <input type="hidden" name="SHOP" value="<Actinic:Variable Name="HiddenFields"/>" /> </actinic:block> <input type="hidden" name="page" value="search" /> <input type="text" name="SS" value="Quick Search" onfocus="this.value='';" class="quick-search-text" /> <input type="hidden" name="PR" value="-1" /> <input type="hidden" name="TB" value="O" /> <input type="submit" name="ACTION" class="tld_search" value="Search"> </fieldset> </form> </div>
Code:
/** SEARCH */ /***OLD***/ /*.quick-search { clear: right; float: right; } .quick-search input { border: 1px solid <actinic:variable name="Palette1" />; } .quick-search-button { height: 26px; } .quick-search-button-wrapper input { margin: 0; border: none; }*/ .quick-search-text { height: 20px; font-size: <actinic:variable name="StandardFontSize" />; } /*** ***/ *html #quick-search {} #quick-search { clear:right; float:right; position: relative; width: 220px; height: 38px; background: #526A90; border-radius: 5px; -webkit-border-radius: 5px; transition: all 3s; -moz-transition: all 3s; -webkit-transition: -webkit-transform 3s; -o-transition: all 3s; margin:5px 0; } h2.quick-search {color:#fff;} #quick-search form { margin: 0px; padding: 0px 0px 0px 0px; } #quick-search p { margin: 0px; padding: 5px 0px 0px 0px; } #quick-search fieldset { margin: 0px; padding: 0px; border: none; } #quick-search input.quick-search-text {padding-top: 5px;margin-left:0;} #quick-search input.quick-search-text { line-height: 18px; border: 0; width: 120px; height: 18px; padding: 10px 50px 10px 10px; background-color: #CAD3E0; border-radius: 5px; -webkit-border-radius:5px; transition: all 3s; -moz-transition: all 3s; -webkit-transition: -webkit-transform 3s; -o-transition: all 3s; } #search-query { width: 220px; margin-top: 6px !important; border: none; background: #c0c0c0; } #search-submit { width: 55px; margin-left: 30px !important; padding: 5px 0px 10px 0px; border: none; line-height: 1; text-transform: lowercase; } input.tld_search { border: 0; height: 38px; width: 38px; text-indent: -999999px; background: transparent; background-image: url('icon_24x24_search.png'); background-position: center center; background-repeat: no-repeat; overflow: hidden; position: absolute; cursor:pointer; top: 0; right: 0; } /********************************/
At first it looked like the autosuggest was not working, it could not be seen.
In the event, the autosuggest WAS there all along but it was displaced to the right of the screen. The actinicsearch.js script had appended an inline style of left: 1290px; which of course pushed it right off the screen.
The difference between my design and the default serach box is that my search div is position:relative, so the position becomes 1290px to the right of the search box.
The top position seems to be from the top of the page so SD is positioning the autosuggest relative to the whole page; EXCEPT: the default site is 970px SO SD must be calculating the position from the top left of the monitor display. I can't over ride the styles with an expression in the head of the page because they are inline so the only alternative is to edit actinicsearch.js thus:
Line 246:
var posX = findPosX(thisSearch);
var posY = findPosY(thisSearch);
I changed to:
// var posX = findPosX(thisSearch);
// var posY = findPosY(thisSearch);
var posX = '0';
var posY = '0';
and the autosuggest is perfectly positioned below the search box.
But I can't work out where SD is getting the PosX from. Moreover, there appears to be no instance of thisSearch in the default site.
The fix works but it is annoying because it will need reapplying when the site is upgraded.
This is just posted in case anyone else has this issue or in case you fancy a nice search box to which you are, of course, welcome!
Thanks
Comment