Re: What about javascript

From: Date: Thu, 09 Aug 2001 13:49:00 +0000
Subject: Re: What about javascript
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1340@lists.php.net to get a copy of this message
Stig Sæther Bakken wrote: > > [Bertrand Mansion <bmansion@mamasam.com>] > > Hi, > > > > Adam Daniel and I are finishing an html form class for PEAR. It is > > more powerful and more complex than the current form class in PEAR > > but I believe users can need both of them depending on their needs. > > One of the things I'd like to do with an HTML form class is to connect > it with either DB_storage or Tomas's new DB_row class, so you can > define relationships between forms and database tables. So far I've > only defined a "storageObject" attribute and then I got lost thinking > how it should work... ;-) One of my ideas is to connect the row object with the template system to build a really automatic system, something like: while ($res->fetchInto($row)){ $row->autoBlock('block1'); } This assigns all var's in a block and parses it. Ie: <!-- BEGIN: block1 --> <tr><td>Name: {block1_id}</td></tr> <!-- END: block1 --> "block1_id" will be filled with the id column data from the Database. Isn't sound cool? > > My question is about a javascript file we use for javascript validation on > > the client. Part of the javascript is computed by the php class and the > > rest, two core functions, are in a small external javascript file. I think > > this is faster both on client and server than to generate this file contents > > with a php script. Please be sure that all the validations are done by php besides JS. JS is very comfortable to the user but is useless as a secure validation system. > > Are there any problems with .js file in current repository ? Will the > > infrastructure (package installer...) know how to handle them ? > > It would be good to know what pieces we are trying to organize before > deciding on how to deal with Javascript. Form validators are typical, > but I think they are specialized enough to make them part of the html > form package. The "other" Role seems to be enought for me. Tomas V.V.Cox

« previous php.pear.dev (#1340) next »