On 27-10-2008 at 22:15, Gregg Bolinger wrote: > I might just be having a brain fart moment but I can't seem to figure out a > good way around this. I want to submit a form via ajax but I want to allow > Stripes to do all its normal server side junk with regards to validation. > If the form fails validation, how can I return just the error messages back > to the browser? As of right now the entire "sourcePage" is getting sent > back. My only thought is that I would have to do my own validation, but I'd > really like to just let Stripes do it.
This entirely depends on how AJAXy you want it. From your description, I'm assuming you intend to do a submit behind the scenes and use Javascript to show the results. One way to do that, is to do a partial page submit: - submit the form via Javascript - get the results - display them instead of the form, after fully recieving it The difference with a normal submit is that displaying starts when the results are fully loaded; not when they start loading. This should reduce the annoying flicker / page refresh when doing a normal (full page) submit. If this doesn't solve your problem, your only option is to validate client-side yourself. Oscar -- ,-_ /() ) A: Because it messes up the order in which people normally read text. (__ ( Q: Why is top-posting such a bad thing? =/ () ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
