custom validation- won't fire

Discussion in 'ASP .Net' started by Mr. SweatyFinger, Feb 26, 2007.

  1. hi.
    i have a bunch of controls that get validated with the validation controls
    in vs2005

    there are two that i could not find a control for so i wrote some
    javascript.

    so i set my submit button to
    OnClientClick="vRealtor()"


    yet my function is not executed.
    What is the problem??


    <script language="javascript" type="text/javascript" >

    function vRealtor() {

    if (document.all.RealtorTextBox) {

    if (document.all.RealtorTextBox.value != "")

    {

    if (document.all.RealtorCompanyTextBox.value == "")

    {

    alert("You must enter a company since you entered a realtor name")

    }

    else

    {

    alert("asdfasdf")

    }

    }

    else

    {

    alert("3333")

    }



    }

    }

    </script>
     
    Mr. SweatyFinger, Feb 26, 2007
    #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. Chad
    Replies:
    4
    Views:
    8,376
  2. Ben
    Replies:
    1
    Views:
    611
    SevDer
    Jul 28, 2005
  3. Replies:
    16
    Views:
    639
    Jarek Zgoda
    Aug 1, 2005
  4. Scott McNair

    Custom Control Won't Fire

    Scott McNair, Jul 27, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    387
    Scott McNair
    Jul 27, 2007
  5. Why custom validation can not fire client event?

    , Jan 9, 2006, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    123
Loading...

Share This Page