How can I implement a javascript – onclick=”example()” after the user clicked the facebook like button?
The facebook button code is –
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like-box onclick="displayThread('likepost')" href="http://www.facebook.com/pages/JBL-software-house/225964907420086?sk=wall" width="292" show_faces="false" stream="false" header="false"></fb:like-box>
Simply include the JavaScript you wish to execute as part of the onclick attribute:
Change the part
onclick="displayThread('likepost')"to:onclick="example();displayThread('likepost')"