passing fmt:message as argument
Sorry if this is more JSPish than strutsish, but I'm sure someone can help. I have a javascript I am using for tooltips and I want to pass text defined in my applications.resource file to it. == applications.resource === someText=This is some text. == foo.jsp === img src=images/foo.gif width=10 height=10 alt=[foo] onmouseover=ddrivetip('This is some text.'); onmouseout=hideddrivetip();/ What do I need to do to the img tag to use the message in applications.resource? Thanks. Dean Hoover - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: passing fmt:message as argument
Can't you insert a bean:write message=myKey/ there? Dean A. Hoover wrote: Sorry if this is more JSPish than strutsish, but I'm sure someone can help. I have a javascript I am using for tooltips and I want to pass text defined in my applications.resource file to it. == applications.resource === someText=This is some text. == foo.jsp === img src=images/foo.gif width=10 height=10 alt=[foo] onmouseover=ddrivetip('This is some text.'); onmouseout=hideddrivetip();/ What do I need to do to the img tag to use the message in applications.resource? Thanks. Dean Hoover - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: passing fmt:message as argument
Use the following -- it will work: img src=images/foo.gif width=10 height=10 alt=[foo] onmouseover=ddrivetip('bean:message key=someText/'); onmouseout=hideddrivetip();/ As far as quotes, you just need to make sure that they don't interleave -- JSP translation occurs first so you things will work correctly. As far as using fmt:message -- either one works okay -- if you do want to use the JSTL tags make sure that you define the localization context in your web.xml to point to your message resources ... web-app context-param param-name javax.servlet.jsp.jstl.fmt.localizationContext /param-name param-value ApplicationResources /param-value /context-param ... Bill Siggelkow Dean A. Hoover wrote: Don't know... didn't happen to see any examples like that. Not sure about how the parsing deals with strange nesting of angle brackets, quotes, etc. Also, aren't we moving away from bean:message in favor of fmt:message? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]