You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by William Bagby <wi...@adone.com> on 2001/02/20 17:06:55 UTC

Site Navigation

This may or may not be off-topic, but here goes...

Scenario:  I have a form on a page that a user fills out in order to do a
search.  I need to validate the form BEFORE the search is performed.  If the
fields are invalid, show some type of error page (it could even be the page
with the form on it itself, with missing/invalid fields highlighted).  The
way I see it, there are a few different ways to do this:

1) Javascript/DHTML
2) XSP using redirects
3) Perform validation in the Producer, using my own static methods, and load
appropriate XML page

Obviously 1) is has limited use and can only be used for the most basic
forms.  2) will work, I have seen it work, but it doesn't sit well with me
to have the page itself perform validation, and I have seen server-side
redirects act screwy at times. 3) seems the most promising, but it seems to
me that it would be more difficult to update if the fields change.

Yeah, I know, this sounds more like a design question than a Cocoon
question, but I figure maybe some of you have had to deal with this scenario
before and can point me in the right direction.

Thanks,

William