Re: HTML_QuickForm and improved version of advmultselect component
| From: | Ian Eure | Date: | Thu, 02 Jun 2005 03:41:12 +0000 |
| Subject: | Re: HTML_QuickForm and improved version of advmultselect component | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-37920@lists.php.net to get a copy of this message | ||
On Wednesday 01 June 2005 05:30 pm, Justin Patrin wrote:
> On 6/1/05, Laurent Laville <pear@laurent-laville.org> wrote:
> > Hi all,
>> (snip)
> > I could then start a proposal if nobody is against this idea.
>
> I'd like to mention for everyone's benefit that this isn't a normal
> multi-select, it's two select boxes next to each other emulating a
> multi-select.
>
Thank you for that clarification.
My concern is the same as the last time this came up; I think it needs to be
backwards-compatible with non-JS browsers.
The way to accomplish this is:
- Send a regular multiple select control in the markup, with a class set so
you can identify it later.
- Use JavaScript to:
= Change the name of the original control to something else
= Create the second select element, giving it the correct name (the "old"
name of the element in the markup
= Create any necessary controls, buttons, etc.
= You'll also need a handler to set the "selected" attribute of everything
in the 2nd select element when the submit button is clicked.
Since the scripted element is functionally identical to the normal
multiple-select, it seems like a bad idea to make it incompatible with older
browsers.
I'd be glad to work on the JS end of things if help is needed.
I also created a "script" element for QF a while back, for just this type of
embedded-scripting scenario, but my changes were rejected. If it's possible,
I'd like to propose that as a QF subpackage, since I think it's useful,
particularly in this scenario. I have no idea if there's something different
I have to do to create/propose a subpackage, so input/suggestions on this
point is welcomed.
Attachment: [application/pgp-signature]
Attachment: [application/pgp-signature]