I'm following this tutorial: https://www.eliostruyf.com/part-5-search-refiner-control-methods-explained/

Everytime I run this, it alters the ribbon bar so that I can't "Stop Editing" the page that I've added my script editor webpart to.

function runAfterEverythingElse(){
    var refiner = $getClientControl(document.getElementById("ctl00_ctl40_g_f26d831b_bc2d_4961_928b_b3969eba84d7_csr1"));
refiner.addRefinementFilter('FileType', 'html');
  • The ribbon gets altered when there is error in the code which loads on page loading. Oct 31 '18 at 17:40
  • which web part are you using? and why are you adding refinement filter using javascript instead of adding refinement filter in OOTB way? Nov 1 '18 at 7:58
  • I have a page that presents 9 icons.. Pretend these are product categories.. books, music, etc. The user picks a category and is brought to the search results page that is filtered on that category. The issue is if the user then executes a keyword search the filter is removed and a new search is issued. If you select a category on Amazon like books and then enter a keyword search, everything is still filtered by books and the keyword you just issued. Nov 1 '18 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.