ect the asset and use it in your script - see
> > http://tapestry.apache.org/assets.html
> >
> > Code should look something like this:
> > @Inject
> > @Path("context:images/button.png")
> > private A
mething like this:
> @Inject
> @Path("context:images/button.png")
> private Asset button;
> ...
> javaScriptSupport.addScript("jQuery(button).attr('style',
> 'background-image : url(%s);');", bu
dScript("jQuery(button).attr('style',
'background-image : url(%s);');", button.toClientURL());
--
Chris
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Javascript-access-to-Tapestry-Image-Asset-tp4920809p4920940.html
Sent from the Tapes
Is it possible to find out that path, set it to a JS variable using
JavascriptSupport, and use that variable in ur js files ?
On Thu, Oct 20, 2011 at 10:51 AM, Ray wrote:
> Hi all,
>
> I need to be able to access an image from javascript using the following
> call:
>
> jQuery(button).attr("style
Hi all,
I need to be able to access an image from javascript using the following
call:
jQuery(button).attr("style", "background-image : url(images/button.png);");
The problem is that this will not work for me in the future as I have a
requirement to change the URL based on locale.
So what I was