I would like to turn on a label control in javascript with the onfocus event
of another control by setting the Visible property to true. When I try and
reference this label control it says "Microsoft JScript runtime error:
'document.Form1.lblSigGrantor' is null or not an object". I wrote a loop and
iterated through the elements for the form and this control doesn't show up.
Code listed below, please help.
Thanks,
John Holmes
---------- html code, the onfocus event of the OBJECT tag calls
javascript:OnSign(); .. OnSign() listed below ----
<table id=tblSigGrantor cellSpacing=0 cellPadding=0 border=1>
<tr>
<td>
<asp:label id="lblSigGrantor" name="lblSigGrantor"
runat="server" Width="100%" ForeColor="White"
Visible="False" BorderColor="#404040" BackColor="Red">
VIRTUAL SIGNATURE PAD FOR GRANTOR SIGNATURE
</asp:label>
</td>
</tr>
<tr>
<td>
<OBJECT id=SigPlus1 onblur="OnSave('XYZ','txtSigGrantor');"
style="LEFT: 0px; WIDTH: 320px; TOP: 0px; HEIGHT: 180px"
onfocus="javascript:OnSign();" height="75"
classid="clsid:69A40DA3-4D42-11D0-86B0-0000C025864A" name="SigPlus1"
VIEWASTEXT>
<PARAM NAME="_Version" VALUE="131095">
<PARAM NAME="_ExtentX" VALUE="4842">
<PARAM NAME="_ExtentY" VALUE="1323">
<PARAM NAME="_StockProps" VALUE="0">
</OBJECT>
</td>
</tr>
</table>
-------------------------------- OnSign(); ... javascript code
.....----------
function OnSign()
{
OnClear();
document.Form1.lblSigGrantor.Visible = true;
document.Form1.SigPlus1.TabletState = 1; //Turns tablet on
}