I am now trying out the messages tag for the purpose of hyperlinking the
error messages to focus on the field in error.
And I can't quite get that to work (the basic messages functionality works
great, though). I don't know if I can gain access to the current message
property field name.

What I would like to do would be to access the name of the property and
include in it the html output within some javascript code. So far, I don't
see a way to do that.

I would like to do something like this:

<ul>
<html:messages id="message" property="firstName">
<li><bean:write name="message"/></li>
<li><a href="javascript:document.forms['userAccountForm']['<%=
!!!current property here!!! %>'].focus()">>
<bean:write name="message"/>
</a>
</li>
</html:messages>

</ul>

To achieve something like this in the output:
This would give a list of highlighted messages that when clicked will take
the focus to the field in error.

<ul type="square">

<li><a
href="javascript:document.forms['userAccountForm']['confirmPassword'].focus(
)">Confirm Password does not match Password</a> </li>
<li><a
href="javascript:document.forms['userAccountForm']['lastName'].focus()">Last
name is a required field</a> </li>
</ul>

Any thoughts?

Thanks,
Michelle


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

Reply via email to