Entry
How can we make a button visible at runtime
Apr 27th, 2006 05:15
Kumaran Rajakumar, jagdish jagdish,
If the button is already there in the form u can use
To hide the button:
document.getElementById("buttonId").style.display="none";
To show a button
document.getElementById("buttonId").style.display="block";
or if u want to create a button at runtime. use the following code
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function t()
{
document.getElementById("btnDiv").innerHTML = "<input
type=button value='runtimeBtn' name='newBtn'>";
}
//-->
</SCRIPT>
</HEAD>
<BODY onload="t()">
<FORM METHOD=POST ACTION="">
<div id="btnDiv"></div>
</FORM>
</BODY>
</HTML>