I've got some code that is meant to hide a div in HTML if a variable is empty.
Sub checkBattery
If IsEmpty(e("batremaining")) Then
batteryShow.style.visibility = "hidden"
Else
batteryShow.style.visibility = "visible"
End If
End Sub
checkBattery
This is extremely frustrating me, because I have no idea why it is not working.
Here is my <div>:
<div id="batteryShow" class="panel panel-warning batteryShow">
<div class="panel-heading">
<h3 class="panel-title">Battery Percentage</h3>
</div>
<div class="panel-body">
<center><div style="font-size:16px;font-weight:bold;">Battery Level: 100%</div></center>
</div>
</div>
I am probably missing something extremely simple and easy to fix, but I cannot for the life of me figure out what.
IsEmpty- msdn.microsoft.com/en-us/library/5cs4befa(v=vs.84).aspx) is correct? Do you want to check for an empty (i.e. zero length) string? What ise()? Exact line of error?