NYCPHP Meetup

NYPHP.org

[nycphp-talk] Dynamic Form Elements

Peter Sawczynec ps at sun-code.com
Fri Feb 1 10:58:07 EST 2008


This note is purely a personal reflection. 

Www coders have been developing and juggling JS usability with some
seriousness at least since NS3 and IE 1 were the serious browser
platforms. In this time, no downside risk to using JS has slowed JS
spread and usage.

Over time it has become one of my hard won beliefs that it is likely
superior to cater more strongly to the 94% of users that have JavaScript
turned on and try with slick, convenient features (Ajax, Flash, Java
applets, JS, DHTML) to get a bigger share of that slice of the 94%
market than possibly to hedge a  web site's eye appeal and clickability
by deving pages for JS turned off. (Again all just IMHO.)

I feel that show/hide DOM elements is now de rigueur and SOP and has
almost single handedly helped turn web pages into the intensely
concentrated dynamite packs of information that they are now.

I vote, pour on the JS. Show/hide. Tool tips. Mouseover. And even, whoa,
inline frames. 

Peter





 

 

-----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]
On Behalf Of Jake McGraw
Sent: Friday, February 01, 2008 9:23 AM
To: NYPHP Talk
Subject: Re: [nycphp-talk] Dynamic Form Elements

I'd create the form normally, with the optional select visible, but
the first value of the optional select list stating "Applicable only
for value XYZ". Then I'd use JavaScript to hide the optional select
list, remove the "Applicable only for value XYZ" and detect an
onchange event on the first select list for determining visibility for
the optional select list. This way, if your user is one of the 6% of
internet users without JavaScript turned on, at least the second list
will make some sense. When the request gets sent to the server, always
check both values and make sure it makes sense. I always try to
develop my web applications / forms entirely in HTML first and make
sure it works without javascript, then I add javascript where it makes
sense for a better user experience.

- jake

On Feb 1, 2008 6:42 AM, David Krings <ramons at gmx.net> wrote:
> Michael B Allen wrote:
> > What's the best, most portable way to do this?
>
> There is likely a better way, but what I do (and I think I needed it
once) is
> to simply reload the page and evaluate the submission. Ugly, but it
works and
> it is definitely portable. You can either do an automatic self-submit
(not
> section 508 compatible...as most of the Web2.0 stuff) or wait for the
submit
> button to be clicked.
>
> David
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php




More information about the talk mailing list