I'm having an issue with my page layout where I've set up an HTML table structure. I want to display static text if the td
is empty. Here's the code I'm using:
<td>
<div id="dvCountry">
<SharePointWebControls:FieldValue FieldName="Country" DisableInputFieldLabel="true" runat="server"></SharePointWebControls:FieldValue></div>
<div id="dvOffice">,<SharePointWebControls:FieldValue FieldName="Office" DisableInputFieldLabel="true" runat="server"></SharePointWebControls:FieldValue></div>
<script type="text/javascript">
var td = document.getElementById("dvCountry");
if(td.innerText.length == 0){
td.innerText = "Group";
var divOffice = document.getElementById("dvOffice");
divOffice.innerText = "";
}
</script>
</td>
While this code is working in IE and Chrome, it's failing in Firefox. Any ideas on what could be causing this issue?