Thanks for your replies. I'll try to give some background, and also some real examples rather than my simplified one that I originally posted with
OK, agreed, field level help in a new browser window or tab is a bad user experience. However, for a number of stupid political reasons (mainly based around managers not understanding accessibility vs. browser capability - they basically think that WAI accessibility means no javascript
) I need to be able to support delivering help in a 'low tech' way of a new browser window, plus 'more modern' (we might call them standard these days
) ways such as div overlays etc.
So, whilst we are in agreement that its a cruddy solution, I need to do it
To answer David's comment of a new browser window just for a single sentance such as "Please enter your user name" - that was more my mis-direction in that I used a very very simple example in my original post. Sorry! In relality, the text will be more verbose than that, usually covering several paragraphs etc. I guess some of it could be termed as faqs. For the username field for example, there may be a help link that describes why you are encouraged to login, what you can do once you are logged in, how you can register for an account if you've not already done so etc. The text will be from marketing, full of waffle, and therefore lots of it
As I need to support both new browser window, plus some 'new fangled' js/div solution, I thought I'd tackle the easier of the two - the new browser window.
Given that there will be lots of help text (more that a single sentance) thats why I dont want to pass the text as a query
string param (in fact most of the time I would probably exceed the length limit of a GET query string for some browsers)
I like the idea of using a resource key, where presumably I have a properties file defining the help text?
Then in my AboutYou.jsp I might do
The in my ftl for a textarea component I was planning on doing
Where the action can lookup the resource key and display the text.
But what I dont know is how I pass the value of the helptext parameter ("AboutYou.username" in this example) to the help action. I guess I could do it on the qs, but it would nice to know of other solutions.
Thanks in advance of any ideas;
Cheers
Nathan