W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2004

[whatwg] Suggestion: "context" attribute

From: Doron Rosenberg <doronr@gmail.com>
Date: Fri, 25 Jun 2004 09:56:12 -0500
Message-ID: <6814aebd040625075649df03c4@mail.gmail.com>
You imagine this as a tooltip like thing (hovering over the input with
the mouse would show the div at the mouse pointer)?  XUL has a similar
concept.

You probably want to leave it up to the UA to decide how to show it
(handhelds and accessibility usually have it hard to deal with large
tooltip areas).

On Fri, 25 Jun 2004 10:35:43 -0400, Matthew Raymond
<mattraymond at earthlink.net> wrote:
> 
>     This is a revision of an earlier idea I had. The general purpose of
> this attribute is to support popups. Sample code time!
> 
> ------------------------------------------------------------
> 
>     <div id="myPopup" repeat="template">
>        <p>Random popup stuff</p>
>     </div>
> 
>     <input type="text" value="some text" context="myPopup">
> 
> ------------------------------------------------------------
> 
>     Since templates are not displayed, the <div> element above is not
> rendered by a Web Forms 2.0 UA. For Internet Explorer, the context
> attribute is ignored, and CSS can be used to suppress rendering of the
> <div> element.
> 
>     For all intents and purposes, the template would be treated as the
> child of the element referencing it in its context attribute. The block
> would be automatically removed once it looses focus or processes some
> kind of user input.
> 
>     (Actually, now that I think about it, if the UA is IE, Javascript
> could be used to move the template <div> over the <input> element, make
> it visible, and handle the events, et cetera.)
> 
>     At any rate, the end result would be a popup that doesn't require
> Javascript(on WF2 UAs) and can contain whatever content the user would
> like, even non-menu content. In fact, the attribute need not even be
> limited to form elements. Now that I think of it, this may be more
> WebApps 1.0 territory...
> 
>     At any rate, comments welcome, even the ones that point out my
> obvious ignorance and stupidity. ;)
>
Received on Friday, 25 June 2004 07:56:12 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:34 UTC