harishkumar09 Posted August 7, 2008 Share Posted August 7, 2008 How do we embed JavaScript in PHP code ? Is it the same way as in HTML ? More specifically , I want to add "bookmark this site" button onto my phpBB forum. It is a javascript.It was giveb y the site www.addthis.com which gives this javascript to add buttons to enable people to bookmark your site in their social bookmarking sites like digg , Reddit , facebook. I want to have this appear at the top of every new thread in my phpBB forum. Or even just in the index page will do.All I need to know is how do I go about embedding this Javascript in php or.tpl code ? Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/118583-embedding-javascript-in-php/ Share on other sites More sharing options...
deadlyp99 Posted August 7, 2008 Share Posted August 7, 2008 Yeah its exactly the same as html. The <script> tag is html, and you just imbedd it the same way you would any other html tag. Link to comment https://forums.phpfreaks.com/topic/118583-embedding-javascript-in-php/#findComment-610496 Share on other sites More sharing options...
harishkumar09 Posted August 7, 2008 Author Share Posted August 7, 2008 Yeah its exactly the same as html. The <script> tag is html, and you just imbedd it the same way you would any other html tag. Thanks a lot. You guys are real fast !!! ;D Link to comment https://forums.phpfreaks.com/topic/118583-embedding-javascript-in-php/#findComment-610501 Share on other sites More sharing options...
deadlyp99 Posted August 7, 2008 Share Posted August 7, 2008 No problem, glad to help Link to comment https://forums.phpfreaks.com/topic/118583-embedding-javascript-in-php/#findComment-610503 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.