As I have lectured endlessly, any validation you do on the client
needs to be backed up on the server. You cannot rely on JavaScript
for anything, because it is in the user’s control. And you can’t
trust the user any further than you can spit a live rat.
Slightly longer answer, yes, you can create DIVs in Prototype:
new Insertion.After('someElement','<div class="alert">You made a boo-
boo!’);
And you can do all sorts of cool stuff with third-party libs, like
Control.Modal or Prototype.Window, that allow you do do all sorts of
lightbox-y things with random div content.
But you really really have to test this stuff on the server
before you let it anywhere near your database or mailserver, so it’s
best to attack it there first, and then later add a javascript
version as a convenience to the user (since it’s faster to do this on
the client, without a round-trip to the server).
Walter
On Jan 10, 2008, at 2:51 PM, Todd wrote:
Cool. On the Temple form, the large colored alert box that lists
the errors; is that something that’s created by the form handler or
is it also possible to use prototype for this? I know Mike B. uses
this on his easiForm action.
Todd
On Jan 10, 2008, at 1:42 PM, Walter Lee Davis wrote:
Errr. Typo.
Event.observe(window,‘load’,function(){
Event.observe(‘yourform’… etc.
});
That closing parenthesis (or lack thereof) will get you every time.
offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options