mdupras Posted October 19, 2010 Report Share Posted October 19, 2010 Is there a way to hide the header, for example, on a search and report error page when no results are found? -- Mike Quote Link to comment Share on other sites More sharing options...
0 shengnandou Posted October 19, 2010 Report Share Posted October 19, 2010 Hi Mike, So you have inserted header&footer to a Report Datapage and wanted to hide the header when "no records found"? It might be possible with programming to wrap the code in header in a and insert Javascript in footer to check the status of the results page to display or hide the in header. Quote Link to comment Share on other sites More sharing options...
0 mdupras Posted October 20, 2010 Author Report Share Posted October 20, 2010 That's it, or something like it! I just gave the header a and then customized the error message to hide that ID. I think I've actually done this before but just forgot how to do it ... thanks! -- Mike Quote Link to comment Share on other sites More sharing options...
0 bahar_vm Posted October 20, 2010 Report Share Posted October 20, 2010 We have an article which shows how to hide the map when no record is found in the results page. You can get the idea from this article and apply to other cases, http://howto.caspio.com/extensions/maps ... found.html. Best, Bahar M. Quote Link to comment Share on other sites More sharing options...
0 iren Posted July 6, 2015 Report Share Posted July 6, 2015 To hide the header, follow the following steps: 1) Edit Localization, customize the HTML text in the Custom Text by adding div tag: <div id="norecord"><h1>No records found.</h1></div> 2) Edit DataPage. Go to the 'Configure Results Page Fields'. Inser Header&Footer. 3) Paste the code in the 'Header' field: <span id="HideHeader"><h1>Text</h1></span> Enter your header text instead of Text. 4) Paste the code in the 'Footer' field: <script>function func_NoRec_Header() { if (document.getElementById("norecord")) document.getElementById("HideHeader").style.display = "none"; } window.onload=func_NoRec_Header; </script> Hope it helps. Quote Link to comment Share on other sites More sharing options...
0 Breee Posted January 29, 2018 Report Share Posted January 29, 2018 Hi, Does anyone know how to modify this code to hide "APP Parameter" headers? I tried updating the above and also used the Hide Map instructions found earlier; both attempts to update have not been successful. I have a search filter on a datapage that is using an "APP Parameter" header. When a search returns "no records" based on the filtering of data I need for the header to hide and for a message to display in its place. Currently, when the search occurs and no data is returned the header shows with blank information and live URL links. I'd like to hide the header in its entirety and direct the user via a message to search another area of the website. Thanks. Quote Link to comment Share on other sites More sharing options...
0 MayMusic Posted February 5, 2018 Report Share Posted February 5, 2018 You just need to replace window onload event: <script>function func_NoRec_Header() { if (document.getElementById("norecord")) document.getElementById("HideHeader").style.display = "none"; } //window.onload=func_NoRec_Header; document.addEventListener('DataPageReady', func_NoRec_Header); </script> Breee 1 Quote Link to comment Share on other sites More sharing options...
0 MayMusic Posted February 5, 2018 Report Share Posted February 5, 2018 On 10/20/2010 at 9:31 AM, bahar_vm said: We have an article which shows how to hide the map when no record is found in the results page. You can get the idea from this article and apply to other cases, http://howto.caspio.com/extensions/maps ... found.html. Best, Bahar M. This is the new link to this article: https://howto.caspio.com/faq/map-mashup/how-to-hide-the-map-if-no-records-found-on-the-result-page/ Quote Link to comment Share on other sites More sharing options...
0 Breee Posted February 14, 2018 Report Share Posted February 14, 2018 Good Morning, Thank you so much for your reply. My header is an app parameter [@app:ORG_Hourly_EOP_Header]. I added the following code to localization and the header and footer locations of my datapage (configure results page); the localization message is showing "No Records Found." The app parameter header is still displaying it is not hidden. I'm showing the code that I used and its placement below. Localization: Forms/Details Messages 351: <div id="norecord"><h1>No records found.</h1></div> Datapage Configrure Results Page Header: <span id="HideHeader"><h1>Text</h1></span> (I'm assuming that I need to call the app parameter into the div somehow but I'm unsure how to go about that). Datapage Configrure Results Page Footer: <script>function func_NoRec_Header() { if (document.getElementById("norecord")) document.getElementById("HideHeader").style.display = "none"; } //window.onload=func_NoRec_Header; document.addEventListener('DataPageReady', func_NoRec_Header); </script> Further assistance would be greatly appreciated. Thank you. Bre Quote Link to comment Share on other sites More sharing options...
0 MayMusic Posted February 14, 2018 Report Share Posted February 14, 2018 If you replace your app parameter in your span it should work: <span id="HideHeader"><h1> [@app:ORG_Hourly_EOP_Header] </h1></span> Quote Link to comment Share on other sites More sharing options...
0 Breee Posted February 16, 2018 Report Share Posted February 16, 2018 Thanks again for responding. I did insert: <span id="HideHeader"><h1> [@app:ORG_Hourly_EOP_Header] </h1></span> into the the header section of the configure results screen but the header is still displaying. I checked with Caspio support and they suggested that I check in forum for assistance. I'm not sure how to get the code to recognize the app parameter for hiding purposes. Any other suggestions would be appreciated. Again, Thank you. Bre Quote Link to comment Share on other sites More sharing options...
0 ammu23 Posted April 2, 2018 Report Share Posted April 2, 2018 you may want to hide tha header and footer on a specific page for several reasons.keep in mind that your landing page does not have a header or footer,this also means that is does not have a manu.pages that have no header or footer, do not display elements. Quote Link to comment Share on other sites More sharing options...
Question
mdupras
Is there a way to hide the header, for example, on a search and report error page when no results are found?
-- Mike
Link to comment
Share on other sites
11 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.