All,
I am trying to hide a div on the View if a form fields value is "".
I tried using the following in the View page/JavaScript OnLoad event:
if (document.getElementById("view1_txtDeployCPType00").value == "")
{
document.getElementById("Initial").style.display = "none";
else
document.getElementById("Initial").style.display ="block";
}
- "view1_txtDeployCPType00" is the span id that is present when rendered. The form field is txtDeployCPType00.
- "Initial" is the DIV I am wishing to manipulate.
Anyone have any suggestions what I am doing wrong?
Many thanks,
Scott