T
tshad
I have a control that I need to run some javascript on.
This used to work in 1.1 and I am now on 3.5 and it doesn't seem to work.
If I do:
**********************************************
<script type="text/javascript">
function CheckSave() {
var field1 = document.getElementById('txtSINInput');
if (field1.value == "") <--------Error
prompt("field1 is blank");
if (field1 == null)
prompt("field1 is null");
if (!confirm('You have made change(s).\nDo you want to leave
without saving?'))
return true;
}
</script>
*********************************************
The javascript gets called fine, but I get an error that says
"Microsoft Jscript runtime error: Object Required".
The object txtSINInput is there:
<asp:TextBox ID="txtSINInput" style="float:left;
margin-right:5px;" runat="server"
CssClass="TextBox" Width="80px" MaxLength="11"
/>
This is on the same page.
Why doesn't it find it?
This used to work in 1.1 and I am now on 3.5 and it doesn't seem to work.
If I do:
**********************************************
<script type="text/javascript">
function CheckSave() {
var field1 = document.getElementById('txtSINInput');
if (field1.value == "") <--------Error
prompt("field1 is blank");
if (field1 == null)
prompt("field1 is null");
if (!confirm('You have made change(s).\nDo you want to leave
without saving?'))
return true;
}
</script>
*********************************************
The javascript gets called fine, but I get an error that says
"Microsoft Jscript runtime error: Object Required".
The object txtSINInput is there:
<asp:TextBox ID="txtSINInput" style="float:left;
margin-right:5px;" runat="server"
CssClass="TextBox" Width="80px" MaxLength="11"
/>
This is on the same page.
Why doesn't it find it?