NYCPHP Meetup

NYPHP.org

[nycphp-talk] custom controls to represent DB relationships

Ajai Khattri ajai at bitblit.net
Wed Jul 14 13:36:19 EDT 2004


Tom wrote:

>What I am looking for is page widgets - HTML/JS doohickeys (technical term!)
>that enhance the user experience.  
>
>Say you have a product that can be assigned to multiple categories - how are
>you representing this on the screen, so that users can quickly
>add/edit/delete multiple categories to that product?  Also, how to you let
>them add a new category?  The emphasis is on minimizing page refreshes, and
>trying to make it more like an application.  Just trying to see what people
>have come up with. 
>
Generally, I would use a multi-choice list for the categories and an 
extra field for adding a new category. I dont think you can avoid the 
roundtrip to the server when adding a category.

I once wrote something (in ASP - bleh!) like this that loaded all the 
choices into JavaScript array objects from a database. Then as the user 
switches products, the categories can switch too by changing the array 
objects used in the category pulldowns through JavaScript callbacks. (A 
bit fiddly but it worked pretty well and it avoided a trip back to the 
server to just refresh the categories list).

-- 
Aj.
Systems Administrator / Developer




More information about the talk mailing list