+ Start a Discussion
wixxeywixxey 

Adding an anchor tag into Apex:Messeges

Hello!

 

I am adding an anchor tag in my Apex:message , but it doesnot show the link , my code is given below, kindly guide me if possible

 

code in controller

 

ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'Password Changed Successfully... click on link to login with the new'+
        ' password <a href="http://abc.xyz.com/index>http://abc.xyz.com/index</a>"'));

 code in visualforce page

<apex:pagemessages escape="false" />

 

 

Best Answer chosen by Admin (Salesforce Developers) 
asish1989asish1989

Hi

You jusy missed to place double quote in the right place .Try this

 

ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'Password Changed Successfully... click on link to login with the new'+
' password <a href="http://abc.xyz.com/index">http://abc.xyz.com/index</a>'));

 

if this post answers your questions please mark it as solved and give kudos for this post

 

Thanks

All Answers

asish1989asish1989

Hi

You jusy missed to place double quote in the right place .Try this

 

ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'Password Changed Successfully... click on link to login with the new'+
' password <a href="http://abc.xyz.com/index">http://abc.xyz.com/index</a>'));

 

if this post answers your questions please mark it as solved and give kudos for this post

 

Thanks

This was selected as the best answer
wixxeywixxey
thanx buddy