You need to sign in to do that
Don't have an account?
Wilmer
How to show a custom label value on a onclick property set as Javascript?
Hi,
I would like to know how can I show a custom label value into a message displayed by an onclick event in a Command Link button.
In example
<apex:commandLink value="{!$Label.MyLabel1}" onclick="return confirm('Are you sure?')" action="{!removeItem}"> <apex:param name="removeItemId" value="{!item.objId}" assignTo="{!selectedItemId}" /> </apex:commandLink>
I would like to replace the hard coded 'Are you sure?' message by a custom Label value, but everytime I try, the related button doesn't work properly. Any kind of suggestion?
Regards,
Wilmer
The answer is easy...
All Answers
The answer is easy...
I would like to use this custom label within onclick="return confirm" but for me it's not working.
This works > onclick="return confirm ('Warning')"
This does not > onclick="return confirm('{!$Label.Custom_Label}')"
This is within a visualforce page
Current code:
Current visualforce page works fine.