{"id":107,"date":"2003-10-10T20:20:52","date_gmt":"2003-10-10T20:20:52","guid":{"rendered":"http:\/\/fiveforks.com\/jeb\/2003\/10\/no_documents_fo\/"},"modified":"2003-10-10T20:20:52","modified_gmt":"2003-10-10T20:20:52","slug":"no_documents_fo","status":"publish","type":"post","link":"https:\/\/www.fiveforks.com\/jeb\/2003\/10\/no_documents_fo\/","title":{"rendered":"No Documents Found"},"content":{"rendered":"<p>After reviewing all posts here, I found this method preferrable for my application, because I needed to provide a different message other than No Documents Found. Thanks to Fernando Matias Valadao who posted this on http:\/\/searchdomino.techtarget.com.<\/p>\n<p>I&#8217;ve made one technical correction. Step 2 needs to be in the On Load and not the JS Header.<\/p>\n<p>1) In the &#8220;HTML Head Content&#8221; of your form or page, add this code: &#8220;&amp;lt style&amp;gt H2 {display:none;} &amp;lt\/style&amp;gt&#8221;<\/p>\n<p>This momentarily hides any H2 text, including the No Documents Found message.<\/p>\n<p>2) Add this code to the &#8220;On Load&#8221; event of your form or page. It searches all H2 text and replaces the No Document Found text. It then displays all H2 text.<\/p>\n<p>var noDocumentsFound = document.body.all.tags(&#8220;H2&#8221;);<\/p>\n<p>var tagH2, textH2;<\/p>\n<p>for (var i = 0; i &lt; noDocumentsFound.length; i++){<\/p>\n<p>tagH2 = noDocumentsFound[i];<\/p>\n<p>textH2 = tagH2.innerText;<\/p>\n<p>if (textH2.toLowerCase() == &quot;no documents found&quot;){<\/p>\n<p>tagH2.innerHTML = &#039;<BR><FONT SIZE=\"2\" FACE=\"Arial\" Color=\"#00673\">Nothing found. Please search again.<\/FONT>&#8216;;<\/p>\n<p>}<\/p>\n<p>tagH2.style.display = &#8220;block&#8221;;<\/p>\n<p>}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After reviewing all posts here, I found this method preferrable for my application, because I needed to provide a different message other than No Documents Found. Thanks to Fernando Matias Valadao who posted this on http:\/\/searchdomino.techtarget.com. I&#8217;ve made one technical &hellip; <a href=\"https:\/\/www.fiveforks.com\/jeb\/2003\/10\/no_documents_fo\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-107","post","type-post","status-publish","format-standard","hentry","category-lotus"],"_links":{"self":[{"href":"https:\/\/www.fiveforks.com\/jeb\/wp-json\/wp\/v2\/posts\/107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fiveforks.com\/jeb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fiveforks.com\/jeb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fiveforks.com\/jeb\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fiveforks.com\/jeb\/wp-json\/wp\/v2\/comments?post=107"}],"version-history":[{"count":0,"href":"https:\/\/www.fiveforks.com\/jeb\/wp-json\/wp\/v2\/posts\/107\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.fiveforks.com\/jeb\/wp-json\/wp\/v2\/media?parent=107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fiveforks.com\/jeb\/wp-json\/wp\/v2\/categories?post=107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fiveforks.com\/jeb\/wp-json\/wp\/v2\/tags?post=107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}