W3C home > Mailing lists > Public > www-forms@w3.org > December 2006

RE: Newbie question: alternative to message/hint/help?

From: John Boyer <boyerj@ca.ibm.com>
Date: Tue, 12 Dec 2006 17:21:41 -0800
To: "Jeff Orchard" <porch@sympatico.ca>
Cc: www-forms@w3.org, www-forms-request@w3.org
Message-ID: <OFBCA370FC.30F9D9D0-ON85257243.0006D343-88257243.00077A9D@ca.ibm.com>
Hi Jeff,

Have you tried a message action on DOMFocusIn?

<input ref="blah">
   <message ev:event="DOMFocusIn" level="ephemeral">Hello, 

You have to be careful to not use a modeless or modal message so the input 
doesn't lose focus as soon as it gains it and so that the input doesn't 
regain the focus as soon as the message is dismissed (which would cause 
the message to reappear).

Aside from that, you could also use group relevance (or even a switch) in 
combination with DOMFocusIn and DOMFocusOut event handlers, e.g.

<input ref="blah">
   <setvalue ev:event="DOMFocusIn" ref="@showme" value=" 'true' "/>
   <setvalue ev:event="DOMFocusOut" ref="@showme" value=" 'false' "/>

<group id="helpForBlah" ref="blah[@showme = 'true']">

Note that a group is considered non-relevant if it binds to a non-relevant 
instance node OR if its expressed single node binding resolves to empty 
nodeset (OR it's within a non-relevant group or switch...).

John M. Boyer, Ph.D.
STSM: Workplace Forms Architect and Researcher
Co-Chair, W3C Forms Working Group
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com  http://www.ibm.com/software/

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer

"Jeff Orchard" <porch@sympatico.ca> 
Sent by: www-forms-request@w3.org
12/10/2006 05:59 AM


RE: Newbie question: alternative to message/hint/help?

Hi all,

Just hoping for a short note indicating whether or not this is possible.
Knowing it's not possible would save me a lot of time.

If it is do-able, an indication of where to look in the specs would be 

All the best,


> Hi all,
> Another newbie question for the experts.
> I'm trying to figure out a way to display a block of instructional text
> when
> an input element has focus.
> It's a fairly lengthy block of text that I'd like to position with CSS, 
> the "levels" behaviours aren't much help. The CSS-P is not a problem, I
> just
> need an element to grab a hold of.
> I considered making the instructional text "relevant" when the input
> element
> has focus, but haven't had much luck finding a way to bind the two.
> Any advice would be greatly appreciated.
> All the best,
> Jeff
Received on Wednesday, 13 December 2006 01:21:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:55 UTC