Results 1 to 8 of 8

Thread: Urgent Java Script Problem

  1. #1

    Thread Starter
    Lively Member AjayKumar's Avatar
    Join Date
    Nov 2003
    Location
    Noida
    Posts
    94

    Unhappy 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.
    HI ITs exciting!!!!!

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Urgent Java Script Problem

    Does this happen with all asp.net projects you create?

  3. #3

    Thread Starter
    Lively Member AjayKumar's Avatar
    Join Date
    Nov 2003
    Location
    Noida
    Posts
    94

    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.
    HI ITs exciting!!!!!

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  5. #5

    Thread Starter
    Lively Member AjayKumar's Avatar
    Join Date
    Nov 2003
    Location
    Noida
    Posts
    94

    Re: Urgent Java Script Problem

    As you said ,every thing is ok.what do i do now?
    plz help
    HI ITs exciting!!!!!

  6. #6

    Thread Starter
    Lively Member AjayKumar's Avatar
    Join Date
    Nov 2003
    Location
    Noida
    Posts
    94

    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
    HI ITs exciting!!!!!

  7. #7
    Member basilisk's Avatar
    Join Date
    Jan 2002
    Posts
    32

    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.

  8. #8

    Thread Starter
    Lively Member AjayKumar's Avatar
    Join Date
    Nov 2003
    Location
    Noida
    Posts
    94

    "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
    HI ITs exciting!!!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width