[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Unobtrusive behavior for field validation is too slow

Posted on 2011-09-26
5
Medium Priority
?
361 Views
Last Modified: 2012-05-12
We use a jqGrid to contain multiple pairs of input fields and we currently use Unobtrusive JavaScript behavior to validate the fields. The problme is that there are far far too many calls, since this type of validation confirms every field against every other field already entered, as it looks for duplicates. Thie create over 30,000 calls for 10 records! We neeed to support over 50 records, so this is a hufge problem.

What I would like to do is validate the current field only. When the user mouses away or even mouse clicks that field, I'd like to NOT re-run the validation that's already been validated.

Any idea how to do this with jQuery and jqGrid?

Thanks.
0
Comment
Question by:newbieweb
[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
  • 3
  • 2
5 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 36704867
What is the validation you need per field and what do you NOT want to run again?
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 36708426
When you say "Unobtrusive JavaScript behavior" - do you use a specific library or do you just mean

window.onload=function() {
...
}

or

$(document).read(function() {
...
});

and is this a duplicate of I need to speed up validation done by jqGrid
0
 

Author Comment

by:newbieweb
ID: 36708957
I deleted the other one. They were a little different but mostly the same.

The jqGrid is configured with AJAX to handle all validation on creation of the jqGrid. But the amount of validation going on is crazy. It's because we require the fields to be unique and it runs its uniqueness test each time it runs, and this creates an exponential number of calls needing to be made. I started writing my own validation, but would be happy to use jqGrid's if it had an option to run like the one I will write.

When the user enters a new value, I will check it for duplicates against all other values already entered. When I display the new duplicates in Red, I will NOT clear out prior duplicates (also shown in red). If I cleared it out, that would mean I needed to recheck the entire list each time, which creates exponential growth in the number of comparison checks, which kills performance.

So I wonder if jqGrid has this option.

Thanks.
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 1500 total points
ID: 36709387
That is a VERY specific question

Did you try asking it here: http://www.trirand.com/blog/?page_id=393
0
 

Author Closing Comment

by:newbieweb
ID: 36719385
Thanks for the link.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

656 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