Java Script Validation in Web User Control - Urgent

Discussion in 'ASP .Net Web Controls' started by Dinesh Reddy N Y, Apr 12, 2004.

  1. Hello EveryBody,

    I am able to use to perform java script validations in the Web User
    Control when i am using a Html Controls.

    But is am facing problems when i try to run the same code after making the
    HTML Controls as servercontrols ie runat = server.

    The Same is working fine in normal .aspx file.

    Here is the Java Script Function which is working before we make the
    controls as runat = server


    function List2Change()
    {
    if(document.all.List2.value == "Y")
    {
    document.all.trList3.style.display = ""; document.all.List3.focus();
    }
    else if(document.all.List2.value == "N")
    {
    document.all.trList3.style.display = "none";
    }
    }

    When we make the Controls for eg: List2 in the code above as runat = server,
    we are getting the foll Java Script error.

    List2 is undifined

    Can any one help me out in this issue.

    Thanks and Regards

    Dinesh Reddy N Y
     
    Dinesh Reddy N Y, Apr 12, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ABC
    Replies:
    1
    Views:
    2,666
    Larry
    Oct 4, 2005
  2. ABC
    Replies:
    0
    Views:
    495
  3. ABC
    Replies:
    0
    Views:
    218
  4. Leyla

    Web user control - custom web control - java script.

    Leyla, May 1, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    135
    Leyla
    May 1, 2006
  5. Eyal
    Replies:
    2
    Views:
    495
Loading...

Share This Page