473,396 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Form postback ..

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



Nov 18 '05 #1
2 1287
view source and see if you find more than 1 control named "Form1"
".Net Developer" <""> wrote in message news:uM**************@TK2MSFTNGP10.phx.gbl...
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


Nov 18 '05 #2
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.

"bruce barker" <no***********@safeco.com> wrote in message news:#4**************@tk2msftngp13.phx.gbl...
view source and see if you find more than 1 control named "Form1"
".Net Developer" <""> wrote in message news:uM**************@TK2MSFTNGP10.phx.gbl...
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



Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Christopher D. Wiederspan | last post by:
I'm wondering if there's a way to use javascript to disable a ASP.NET web page before it starts to postback. Specifically, here's what I'm running into. I've got a webform that has an autopostback...
11
by: Tom | last post by:
Hi all, I posted the same question one week ago in http://communities.microsoft.com/newsgroups/previewFrame.as p? ICP=msdn&sLCID=us&sgroupURL=microsoft.public.dotnet.framewo...
9
by: Dan | last post by:
I am trying to use Request.Form("__EVENTTARGET") to get the name of the control that caused a post back. It keeps returning "". I am not really sure why, this happens for all of my controls...
4
by: Jiho Han | last post by:
What is the best way to check whether the page is simply a postback or the form has been submit with the intention of doing something? In the olden days, I used to check for a form field name...
6
by: varkey.mathew | last post by:
Hi there, I have a basic form with a postback. The following is a line of dynamic code written so that when the user clicks on the Button control, he will receive a confirm messagebox. ...
2
by: Elliot Rodriguez | last post by:
I have a form that contains a mix of dynamic controls and declared controls. All of them are intrinsic .NET controls. Several functions within the page use Request.Form to query the value of the...
12
by: Mark Rae | last post by:
Hi, See the previous thread Request.Form abuse in this newsgroup... I'm looking for a simple and efficient way to prevent people hijacking the <formtags on my websites and using them to send...
4
by: Tim Mackey | last post by:
hi, asp.net 2. can anyone explain why this code does not work in firefox (2.0.0.1), but does work in IE 7. if you hit enter after typing something into the textbox, it should fire the Submit...
0
by: 1388-2/HB | last post by:
I have a page with a significant number of dynamically created radio buttons, checkboxes and textboxes. When a user is presented with this form and subsequently fills a bunch of stuff out, when...
2
by: Raymond Du | last post by:
Hi, I need to find a way to place multiple textboxes and other controls dynamically on a web form, I tried to put a placeholder on a form then create and add controls dynamically into the place...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.