Your browser does not support iframes.`; $('#ux-support-lightbox-content').html(iFrame); $("#ux-support-lightbox").show(); $("#ux-support-lightbox-overlay").show(); } }); $("#ux-support-lightbox .ux-support-lightbox-close").on("click", function(e) { $("#ux-support-lightbox").hide(); $("#ux-support-lightbox-overlay").hide(); }); }); // Declare at the top (global scope) let suggesions = []; let initialKeyword = ''; function submit(keyword) { //console.log('click here'); var prj_id = $("#prj_id").val(); $(".ui-loading-msg").css("display", "block"); $(".x-tab-panel-body").css("display", "none"); $(".ui-page-fb-wrap").hide(); $(".ui-poweredby-kb").hide(); $(".ui-search").hide(); // if (prj_id == '4222' || prj_id == '7105'){ // var url = "/search/crawl_ai_search/"; // }else{ // var url = "/search/crawl_search/?keyword=" + keyword; // } // Check if focus is on #search (user typed or pressed enter in that field) var isSearchActive = $('#search').is(':focus'); var is_ai_search_enabled = $(".is_ai_search_enabled").val(); // Determine URL based on project ID and input focus var url = ""; // if ((prj_id == '4222' || prj_id == '7105' || prj_id == '3335') && !isSearchActive) { // url = "/search/crawl_ai_search/"; // } else { url = "/search/crawl_search/?keyword=" + encodeURIComponent(keyword); //} $.ajax({ url: url, method: "POST", dataType: "json", data: { "query": keyword, "project_id": prj_id, "refer": 1, "is_ai_search_enabled": is_ai_search_enabled, }, scope: this, success: function(result, request) { //console.log(result.suggestions, 'submit'); //cachedSummary = result.summary; initialKeyword = result.permalink; suggesions = result.suggestions; if (window.history.state == null) { setHistroyTourl(result, keyword); } else { if (window.history.state.keyword != keyword) { setHistroyTourl(result, keyword); } } if (result.count != 0) { $(".ui-search").css("display", "block"); $(".hiq-t").hide(); $(".right_toc").hide(); $(".x-tab-panel-body").css("display", "block"); $(".ui-loading-msg").css("display", "none"); //$(".ui-search-form").css("display", "block"); // if ((prj_id == '4222' || prj_id == '7105') && !isSearchActive) { // $(".ui-search-form").css("display", "none"); // } else { $(".ui-search-form").css("display", "block") //} $(".ui-search-txt input").val(result.permalink.split('+').join(' ')); $(".search_hid_val").val(result.permalink); $(".ui-search-body").css("display", "block"); $(".ui-search-body").html(result.page); } else { $(".ui-search").css("display", "block"); $(".ui-loading-msg").css("display", "none"); $(".ui-search-form").css("display", "block"); $(".search_hid_val").val(result.permalink); $(".ui-search-txt input").val(result.permalink); $(".ui-search-body").css("display", "block"); $(".ui-search-body").html("

Sorry your search did not return any results"); } }, }); } //unset the session keyword -

add chat to your website