This content has been marked as final.
Show 1 reply
-
1. Re: How to save a picture address on a click on it.
damianharvey.damianharvey.gmail.com Jul 25, 2008 4:43 PM (in response to ashsneider)You could do something like:
<h:graphicImage url="img/pic01.jpg" onclick="storePicture(this.src);"/> <h:graphicImage url="img/pic02.jpg" onclick="storePicture(this.src);"/> <a4j:jsFunction name="storePicture" action="#{storePictureBean.store}"> <a:actionparam name="param1" assignTo="#{storePictureBean.src}"/> </a4j:jsFunction>
And then handle adding the src to whatever context you want in the Bean.
Cheers,
Damian.