Gravatar for joyceyurh@strateqgrp.com

Question by whyy, Sep 9, 2014 4:21 AM

[Closed] Js Platform - initial panel?

Hi, in Js platform, do we have something like the initialpanel in .net platform? When load the page for the first page, only the search box will be displayed, without any results?

Thanks.

1 Reply
Gravatar for mlaporte@coveo.com

Answer by Martin Laporte, Sep 9, 2014 8:17 AM

There is nothing out-of-the-box for this, but you can pretty easily add a <div> where you'll display something similar, and hide the rest of the UI until the first search is performed.

First you need to disable auto query execution using the autoTriggerQuery option (see https://developers.coveo.com/display/JsSearch/SearchInterface+Component). Then, arrange for all parts of the UI beside your panel to be hidden initially. Then you can use standard QueryBox and SearchButton components in your div. Once the first query is performed (wait for the newQuery event), hide your initial panel, show the rest, and that should do it.

Gravatar for joyceyurh@strateqgrp.com

Comment by whyy, Sep 9, 2014 8:34 PM

Thanks for the answer.

By the way, I just downloaded the sep build CoveoJsSearch, there's a page, Searchbox.html. I think I can make use of that to achieve what I want to do.

Thanks again!

Ask a question