Form postback ..

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
 
B

bruce barker

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
 
N

.Net 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top