« Return to the main article
how about the following:
//styles #viewbody{ border-bottom-width: 1px; border-color: #191970; border-left-width: 1px; border-right-width: 1px; border-style: solid; border-top-width: 1px; height: 25px; }
#emptyView { height: 25px; text-align:center; width: 75%; top: 15%; margin-top: 15px; }
//html <div id = "viewBody">$$viewBody field goes here </div> <div id = "emptyView"> no documents have been found at all</div>
//javascript
function checkEmpty() // function to replace the 'No documents found' message { if (document.getElementById("viewBody").innerHTML.indexOf("No documents found") > 0) { document.getElementById("viewBody").style.display = 'none'; document.getElementById("emptyView").style.display = 'inline'; } else { document.getElementById("viewBody").style.display = 'inline'; document.getElementById("emptyView").style.display = 'none'; }
}
how about the following:
//styles #viewbody{ border-bottom-width: 1px; border-color: #191970; border-left-width: 1px; border-right-width: 1px; border-style: solid; border-top-width: 1px; height: 25px; }
#emptyView { height: 25px; text-align:center; width: 75%; top: 15%; margin-top: 15px; }
//html <div id = "viewBody">$$viewBody field goes here </div> <div id = "emptyView"> no documents have been found at all</div>
//javascript
function checkEmpty() // function to replace the 'No documents found' message { if (document.getElementById("viewBody").innerHTML.indexOf("No documents found") > 0) { document.getElementById("viewBody").style.display = 'none'; document.getElementById("emptyView").style.display = 'inline'; } else { document.getElementById("viewBody").style.display = 'inline'; document.getElementById("emptyView").style.display = 'none'; }
}