?
Solved

CustomValidator client-side validation

Posted on 2005-03-31
2
Medium Priority
?
881 Views
Last Modified: 2008-01-09
I currently have the following code on an aspx page:

function validOtherAssets(source, arguments)
     {
          if (document.getElementById('txtOtherAssets').value > 0 && document.getElementById('txtOtherDesc').value == '')
          {
               arguments.IsValid = false;
          }
          else
          {
               arguments.IsValid = true;
          }
}

<asp:CustomValidator Runat=server ID="cuvOtherDesc" ClientValidationFunction="validOtherAssets();" ErrorMessage="--" Display=None></asp:CustomValidator>

However, I am getting an error on the "arguments" variable.  It claims to be undefined.  My understanding is that "source" and "arguments" are expected variables with a custom validator.

Any thoughts?
0
Comment
Question by:ccboyd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
neil_richards earned 200 total points
ID: 13674270
I believe the problem is the "();" in ClientValidationFunction="validOtherAssets();"

This should read ClientValidationFunction="validOtherAssets"
0
 

Author Comment

by:ccboyd
ID: 13674298
thanks!  that was it!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question