function addSearchResults (entityList) { var results = "" ; if (entityList.length>0) { for (i=0 ; i"+entity["label"]+"

" else if (entity["entity"]==="ModuleEntity") results += "

Module: "+entity["label"]+"

" else if (entity["entity"]==="FormationSetEntity") results += "

Formation Set: "+entity["label"]+"

" else if (entity["entity"]==="MapSetEntity") results += "

Map Set: "+entity["label"]+"

" else if (entity["entity"]==="MapPageEntity") results += "

Map Page: "+entity["label"]+"

" else if (entity["entity"]==="ScenarioEntity") results += "

Scenario: "+entity["label"]+"

" else if (entity["entity"]==="ScenarioReplayEntity") results += "

Scenario Replay: "+entity["label"]+"

" else if (entity["entity"]==="DocumentEntity") results += "

Document: "+entity["label"]+"

" else if (entity["entity"]==="PageEntity") results += "

Page: "+entity["label"]+"

" } $("#searchResults").html(results) ; } else $("#searchResults").html("

No matches found.") ; } if (pathname=="/search") { document.write(getHttp("/body?name=search&sct=0&v=1598950499000")) ;document.write(session["sessionToken"]) ;document.write(getHttp("/body?name=search&sct=1&v=1598950499000")) ;document.write(getQueryParameter("search")?getQueryParameter("search"):"") ;document.write(getHttp("/body?name=search&sct=2&v=1598950499000")) ; $("#searchForm").on ( "submit", function (event) { event.preventDefault() ; $.ajax ( { url: "/app/search", method: "POST", async: false, data: $("#searchForm").serializeArray(), success: function (data) { if (data["error"]) $("#searchFormMessage").html("

"+data["error"]) ; else { addSearchResults(data) ; } }, error: function (jqXHR, textStatus, errorThrown) { $("#searchFormMessage").html("

Failure: "+textStatus+" / "+errorThrown) ; } } ) ; } ) ; if (getQueryParameter("search")) { $.ajax ( { url: "/app/search", method: "POST", async: false, data: {"sessionToken":session["sessionToken"],"search":getQueryParameter("search")}, success: function (data) { if (data["error"]) $("#searchMessage").html("

"+data["error"]) ; else { addSearchResults(data) ; } }, error: function (jqXHR, textStatus, errorThrown) { $("#searchMessage").html("

Failure: "+textStatus+" / "+errorThrown) ; } } ) ; } else { } document.write(getHttp("/body?name=search&sct=3&v=1598950499000")) ; } else { document.write(getHttp("/body?name=search&sct=4&v=1598950499000")) ; }