|
-
Jul 22nd, 2005, 04:04 AM
#1
Thread Starter
Lively Member
Urgent Java Script Problem
Hi,
I am facing a very typical problem in my asp.net(with C#) application.
I have taken a dropdownlistbox on my page with autopostback=true.
I have filled this at page load from database.At Runtime when i select any item from this dropdown i get a error
'Microsoft JScript runtime error: Object doesn't support this property or method'.
I have not written any thing else on page or code behind.
This error comes in autogenerated java script.
<script language="javascript" type="text/javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();-->This is the error line. }
// -->
</script>
This script is autogenerated by asp.net.
Plz help me.
-
Jul 22nd, 2005, 04:29 AM
#2
Re: Urgent Java Script Problem
Does this happen with all asp.net projects you create?
-
Jul 22nd, 2005, 05:32 AM
#3
Thread Starter
Lively Member
Re: Urgent Java Script Problem
No this happens after page successfully load.When i select any item from dropdownlist box this error comes according to attached screeen.
plz help me.
No this comes suddenly in any page.This thing working properly in other pages.In one asp.net project in some pages it is working properly but in some pages it is not working properly.
-
Jul 22nd, 2005, 05:44 AM
#4
Re: Urgent Java Script Problem
Check to see if <FORM> tags exist on your asp.net page.
See if its name is Form1, or something else.
-
Jul 22nd, 2005, 06:25 AM
#5
Thread Starter
Lively Member
Re: Urgent Java Script Problem
As you said ,every thing is ok.what do i do now?
plz help
-
Jul 22nd, 2005, 06:29 AM
#6
Thread Starter
Lively Member
Re: Urgent Java Script Problem
Is it any doPostBack bug of asp.net.
Do i need to install any patch from microsoft.
help bcoz ,it is very urgent .
plz
-
Jul 22nd, 2005, 08:57 AM
#7
Member
Re: Urgent Java Script Problem
do you happen to have a button with the ID = "submit" (or it might be a html submit button with name = "submit") on the page as well as if so then theform.submit will be refering to that control and thats when things are getting a bit confused. If you change the ID to something else and try again. I've just tried this with a html submit button with a name of submit and it came up with the same error you get when you choose an item from the drop down
Last edited by basilisk; Jul 22nd, 2005 at 09:08 AM.
-
Jul 22nd, 2005, 11:01 PM
#8
Thread Starter
Lively Member
"Resolved" Re: Urgent Java Script Problem
Thanks basilisk.Finally my problem is solved according to your suggestion.
I shall be highly thakfull to you.
Mail me at [email protected] for further queries.
byee
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|