netpicker9
02-01-2007, 01:23 PM
Hi,
I have a Checkbox (<asp:CheckBox runat="server" ID="CheckBox1" AutoPostBack="true" />) in a ASP.net Content page
When I click on the checkbox, it giving JavaScript Error as Object doesn't support this property or method
Line: 48
Char: 9
The line which its pointing is a doPostBack javascript block.
<script type="text/javascript">
<!--
var theForm = document.forms['aspnetForm'];
if (!theForm) {
theForm = document.aspnetForm;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
// -->
</script>
What is the solution for this?
how can I change theForm.submit(); to document.aspnetForm.submit(); , is that possible?
I have a Checkbox (<asp:CheckBox runat="server" ID="CheckBox1" AutoPostBack="true" />) in a ASP.net Content page
When I click on the checkbox, it giving JavaScript Error as Object doesn't support this property or method
Line: 48
Char: 9
The line which its pointing is a doPostBack javascript block.
<script type="text/javascript">
<!--
var theForm = document.forms['aspnetForm'];
if (!theForm) {
theForm = document.aspnetForm;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
// -->
</script>
What is the solution for this?
how can I change theForm.submit(); to document.aspnetForm.submit(); , is that possible?