Jump to content

Formatting the ajax autocomplete results string?


Ray UK

Recommended Posts

Hi,

 

Does anybody know how to format the search results in the search box. (See pic or website)

 

I would like it to show like this

 

Category>

Product

 

instead of

 

Category>Product

 

Also, the height of the scroll box.. how can I change that.

 

I have tried adding "height:300," in the blocksearch-instantsearch.tpl underneath "width:90,"

the width setting works ok, but not the height ?

 

Any help is appreciated

 

Thanks

Ray

post-404663-0-57959200-1378456126_thumb.jpg

Edited by MerseyRay (see edit history)
Link to comment
Share on other sites

... and right after posting I noticed this line

 

parse: function(data) {
       var mytab = new Array();
       for (var i = 0; i < data.length; i++)
        mytab[mytab.length] = { data: data, value: data.cname + ' ><br /> ' + data.pname };

 

I added the <br /> in green and it works :rolleyes:

 

but still need the height adjusting for the search results :mellow:

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...