[pmwiki-users] Javascript on a single page

kirpi at kirpi.it kirpi at kirpi.it
Fri Feb 3 04:23:10 CST 2006


> Well, any form validation performed only on the client side
> can always be bypassed, so it's almost always necessary to
> also have it on the server side.  For this reason, most sites
> I've dealt with have always just used server-side validation.
> The main feature of client-side validation is that it can help
> a client formulate a valid request before it goes to the server.
> But it doesn't prevent invalid requests from reaching the server.  :-)

As of today's use of the net, I would agree that form validation is a
required feature in form handling. Due server-side validation is here
both given for granted, and beyond pmwiki's scope. Instead, client
side validation, which is quite useful though not fool-proof, should
be considered as a useful development.
Straight adoption of javascript is already a good thing (thant you for
the hints), but sure pm is right: javascript could be dangerous.


> Sounds like an extension of some sort to me -- i.e., we could
> create markups such as
>
>    (:input email:)
>    (:input number:)
>    (:input text required=yes:)
>
> and it would generate form controls with the appropriate client-side
> validation scripts in place.  It would also require overloading
> the (:input submit:) markup, so that the form controls could be
> validated prior to the form being submitted.
>
> But this definitely sounds like something for the Cookbook to me.
> At any rate, PmWiki offers sufficient "hooks" for it to be done
> as a recipe.

Personally, I am not a programmer, and will hardly add raw javascript
to my pages.
But pm is right, again: if a recipe is developed, with its own
markups, the whole forms will be much more useable. Here I could just
humbly point you all to this page I found
[http://www.javascript-coder.com/html-form/javascript-form-validation.phtml],
where a rather rich list of the most common validations are listed:
hope you find it useful as a starting point,  along with the classic
Apple page: http://developer.apple.com/internet/webcontent/validation.html

Luigi




More information about the pmwiki-users mailing list