You need to sign in to do that
Don't have an account?
AlbertoSM
Conditionally showing images in a input type button
Hi everyone,
I have this input type button but I want to display an Image depending on the language of the visualforce.
I have 4 images depending on the language:
Image1 for Spanish
Image2 for Euskera
Image3 for Catalan
Image4 for english
I don't know how to do it. I've seen multiple times this way to do it, but it's not working:
Thanks in advance and for your time
Cheers!
Alberto
I have this input type button but I want to display an Image depending on the language of the visualforce.
<input type="button" image="{!If(URLFOR($Resource.IKEA_Boton_Enviar_CasCat))}" style="cursor:pointer;border-radius: 10px;" data-role="none" onclick="submitForm()"/>
I have 4 images depending on the language:
Image1 for Spanish
Image2 for Euskera
Image3 for Catalan
Image4 for english
I don't know how to do it. I've seen multiple times this way to do it, but it's not working:
<input type="button" image="{!If(idioma == 'es', URLFOR($Resource.Image1), URLFOR($Resource.Image2))}" style="cursor:pointer;border-radius: 10px;" data-role="none" onclick="submitForm()"/>
Thanks in advance and for your time
Cheers!
Alberto
You can use multiple <apex:image> to add an image in the visualforce page and you can use rendered attribute to check if a condition is satisfied, then display this image.
Please see sample code below which will guide you in the right direction. Hope this helps.
Please mark this as solved if it's resolved so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.
Thanks,
Nagendra