Not quite yet, only because I can't figure out how to get my validate method to return a value easily.
I'm actually using the Ajax methods from Eric's book for validation. Here is basically what I'm doing for the validation part:
On the .jsp I have a dynamic form that lets the user add text fields so they can add users to their object. (Similar to how gmail adds attachments) So these fields can vary in number. So I have a
servlet that takes a username and verifies their certification and verifies if they even exist at our institution. If anyone in the list fails this validation, I display an error message on the page and let the user know which users don't exist and which users still require certification in order to be added to the object they wish to create.
So the validation is like this:
So from Eric's book, what the net.ContentLoader is doing is passing the url in and running the servlet to get the xml back. Then the "certify" method is called. My certify method pretty much just prints out an error message to the page.
What I'd like to do is have the certify method return a boolean value as well to tell whether or not validation passed, that way I can use the local bSubmit variable that was suggested. But because the "certify" method is called from within the "ajaxValidateUser" from the net.ContentLoader constructor as a parameter instead of just calling it directly, I'm not sure how to cascade the return value up from the "certify" method to the "ajaxValidateUser" method to the "validate" method.
This is why I was originaly using the global variable "submit". I would just set it to false if validation failed within "certify".
I hope this makes sense. Any more help would be great. Lemme know if i should clarify anything. Thanks again for the help so far.
-Nate
[ May 31, 2006: Message edited by: Nate Leech ]