Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • praveen 113 posts 164 karma points
    Jun 13, 2011 @ 07:02
    praveen
    0

    Javascript client validations

    Hi

    I have a .NET user control, I want to do some client side validations I am trying to use the following js script

    What I have done so far is included the js script file in the master template but I cant call checkBoxValidate function from my usercontrol.

    PLEASE HELP this is very urgent for me, atleast give me some ideas.

    <!-- Begin
            function checkBoxValidate(cb)
            {
                 for (j = 0; j < 4; j++)
                {
                     if (document.aspnetForm.ckbox[3].checked == false)
                         {
                           document.getElementById('mc').style.display = "none";
                         }
                         if (document.aspnetForm.ckbox[3].checked == true)
                         {
                            document.getElementById('mc').style.display = "block";
                         }
     
                         if (eval("document.aspnetForm.ckbox[" + j + "].checked") == true)
                       {
                        document.aspnetForm.ckbox[j].checked = false;
                        if (j == cb)
                         {
                             document.aspnetForm.ckbox[j].checked = true;
                         }
                    }
               }
            }
       //  End -->

    Kind Regards

  • Jan Skovgaard 11280 posts 23678 karma points MVP 12x admin c-trib
    Jun 13, 2011 @ 09:19
    Jan Skovgaard
    0

    Hi Praveen

    Have you tried inserting it directly on the template where you call your form macro? Should work.

    /Jan

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies