html - How do I tell if external javascript is either not running or not echoing? And why -


the code below works on 1 page, not page (the place should - same place on other page) - blank.

this code displays facebook button, , copied verbatim facebook website.
code there - checked "view page source" in firefox, isn't doing anything.

i can put script, "find on facebook" button, either directly above or below code, , shows okay.

<script src="http://connect.facebook.net/en_us/all.js#xfbml=1"></script><fb:like  href="http://www.facebook.com/pages/[our name]/[our number]" layout="box_count"  show_faces="false" width="50"></fb:like> 

update
if use iframe code instead of xfbml code from: http://developers.facebook.com/docs/reference/plugins/like/ works on both pages (but can't format right - wordpress doesn't iframes in widgets). going on?

update
when disable wordpress facebook share plugin problem goes away. there may problem double initialization of facebook sdk, pointed out chris livey below. there html can add before "like" code de-initialize sdk?

you mentioned firefox. should start looking in tools | error console see if javascript errors occurred during page load.

the next step firebug addon , use see might happening.

(removed update - info did not apply)

update:

okay, word press plug in clobbering you. if going keep word press plug in remove this:

<script src="http://connect.facebook.net/en_us/all.js#xfbml=1"></script> 

from button code , should work fine.

update 2:
of comments, issue boiled down word press plugin using it's own javascript definition fb object. fortunately before creating object performs test see if fb defined.

the fix add correct fb script top of page such executed browser before word press fb share button plugin script. because executed first, word press plugin can't screw while continuing function correctly.

this works if browser executes scripts in order seen on page.

the real fix word press plugin modified use full fb object connect.facebook.com instead of smaller 1 provides.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -