nischalinn
20 Jun 2012, 12:17 AM
Initially the div id =" showHide" is invisible. I want to make it visible when the value of vall is not null. But the code is not working. Though variable vall is getting values, the div is still not visible. What is the problem with js codescript?? How to solve this problem??
<head>
<script language="javascript">
var vall = "<%=vall%>";
<% System.out.println("jsvar="+vall);%>
/* vall is getting the values*/
if (vall != null)
{
mydiv = document.getElementById("showHide");
mydiv.style.visibility = "visible";
}
</script>
</head>
<body>
<div id =" showHide" style="display:none">
/*HTML TABLE*/
</div>
</body>
<head>
<script language="javascript">
var vall = "<%=vall%>";
<% System.out.println("jsvar="+vall);%>
/* vall is getting the values*/
if (vall != null)
{
mydiv = document.getElementById("showHide");
mydiv.style.visibility = "visible";
}
</script>
</head>
<body>
<div id =" showHide" style="display:none">
/*HTML TABLE*/
</div>
</body>