Form postback ..

  • Thread starter Thread starter .Net Developer
  • Start date Start date
N

.Net Developer

Hope some one can help me here..
I have a simple .aspx page with few user input fields. It has a parent-child dropdown lists. For some reason when the Autopostback on the parent ddl gets fired, it results a JS error as "Object doesn't support this property or methd." All the attributes of the ddl are set correctly for the postback to work but still this error pops up.
After much server-side debugging, I noticed that the JS error occurs in the following code :

<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform = document.Form1;
theform.__EVENTTARGET.value = eventTarget;
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit(); => JS Error!!!
}
// -->
</script>

Debug values: eventTarget => contains ID of the parent ddl
eventArgument contained ""

Any idea what's causing this error? any help is greatly appreciated.

Thanks for your help.
Developer
 
view source and see if you find more than 1 control named "Form1"


".Net Developer" <""> wrote in message Hope some one can help me here..
I have a simple .aspx page with few user input fields. It has a parent-child dropdown lists. For some reason when the Autopostback on the parent ddl gets fired, it results a JS error as "Object doesn't support this property or methd." All the attributes of the ddl are set correctly for the postback to work but still this error pops up.
After much server-side debugging, I noticed that the JS error occurs in the following code :

<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform = document.Form1;
theform.__EVENTTARGET.value = eventTarget;
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit(); => JS Error!!!
}
// -->
</script>

Debug values: eventTarget => contains ID of the parent ddl
eventArgument contained ""

Any idea what's causing this error? any help is greatly appreciated.

Thanks for your help.
Developer
 
I did a "View Source" and there is only 1 control named "Form1". Then I changed the form id to frmTest to make sure its unique in the page. But still get the same error.

The problem is not with a autopostback ddl alone, the same error occurs for any other server control such as radiobuttonlist control.

Thanks.

view source and see if you find more than 1 control named "Form1"


".Net Developer" <""> wrote in message Hope some one can help me here..
I have a simple .aspx page with few user input fields. It has a parent-child dropdown lists. For some reason when the Autopostback on the parent ddl gets fired, it results a JS error as "Object doesn't support this property or methd." All the attributes of the ddl are set correctly for the postback to work but still this error pops up.
After much server-side debugging, I noticed that the JS error occurs in the following code :

<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform = document.Form1;
theform.__EVENTTARGET.value = eventTarget;
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit(); => JS Error!!!
}
// -->
</script>

Debug values: eventTarget => contains ID of the parent ddl
eventArgument contained ""

Any idea what's causing this error? any help is greatly appreciated.

Thanks for your help.
Developer
 
Back
Top