[whatwg] Detecting Web Forms for future proof scripts?

Shawn Wilsher me at shawnwilsher.com
Mon Oct 2 09:00:02 PDT 2006


Ric,

Hopefully, you aren't duplicating work that has already been done here:
https://sourceforge.net/projects/wf2/

Granted, this is only for IE, but nearly half of your work is already done then.

Cheers,

Shawn

On 10/2/06, Ric Hardacre <ric at hardacre.org> wrote:
> I'm attempting to write Javascript scriptlets to emulate some of the Web
> Forms 2.0 spec in HTML 4 documents. Firstly, they obviously need to
> degrade for non-scripting UAs, which is easy enough. Secondly they need
> to check that they're running on a compatible scripting engine, just
> checking for the existence of document.getElementById is the simple way
> (If there are better ways then I'm always open to learning). But I'm
> presented with an issue, suppose for example I wanted to emulate the
> datalist element for a text box. I can use the DOM and some on-the fly
> CSS to build a Javascript emulated datalist, but how would one go about
> ensuring that if/when it encounters a browser that can handle the
> datalist that it does not execute? This is probably quite an open
> question and yes I'm aware of the embedding-a-select-inside-the-datalist
> solution to this particular example, but the general question remains:
> How to script WF2 functionality for current browsers in a way that both
> degrades AND yields to the UA when it can handle the functionality natively?
>
> Ric Hardacre
> http://www.cyclomedia.co.uk/
>



More information about the whatwg mailing list