Click here to Skip to main content
15,889,831 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
HI could you help me please I have like 200 pages and I want to add a custom facebook share button but the problem is I will need to add all those urls to share button. Is there a way to automatically add page url to the the code below wher it say "CURRENT URL GOES HERE".


XML
<li class="facebook"><a href="http://www.facebook.com/share.php?u=CURRENT URL GOES HERE" target="_blank"> </a></li>
Posted
Updated 4-Jun-13 12:42pm
v3
Comments
Bernhard Hiller 5-Jun-13 3:22am    
Do you use some kind of content management system?

1 solution

Yes, you can do it with the help of replace function.

Check the demo - [Demo] Replace Href of Anchor[^] to know how it is done.

Here the "CURRENT_URL_GOES_HERE" inside the anchor gets replaced with the CodeProject Url.
 
Share this answer
 
Comments
Member 9739402 5-Jun-13 17:40pm    
OMG thank very much I love you you are my savior
Most Welcome. My Pleasure... :)
Thanks for accepting and up-voting the answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900