Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6384529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:47:14+00:00 2026-05-25T02:47:14+00:00

<div id=test1><div id=fb-root></div> <script src=http://connect.facebook.net/en_US/all.js#xfbml=1> </script> <fb:comments href=http://www.jewelryfresh.com/ num_posts=10 width=739></fb:comments></div> Above is the code

  • 0
<div id="test1"><div id="fb-root"></div>
        <script src="http://connect.facebook.net/en_US/all.js#xfbml=1">
        </script>
        <fb:comments href="http://www.jewelryfresh.com/" num_posts="10" width="739"></fb:comments></div>

Above is the code for facebook comments box. I want to dynamically change the href value to the page on which it is. How can i do it.I do not want the static href value to the page on which it is. How can i do it.I do not want the static href value as it is now. Please help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:47:15+00:00Added an answer on May 25, 2026 at 2:47 am

    You can use div and then dynamically create its contents with the innerHTML method in JavaScript
    where it will be your fb:comments tag. You can get the current page with document.location.href.

    After you create the fb:comments tag dynamically and render it inside the div, you need to reparse its contents so the XFBML is interpreted. You can do it with the FB.XFBML.parse(YOUR_DIV) method.

    Hope this helps.

    var mydiv = document.getElementById("mydiv");  
    mydiv.innerHTML = "<fb:comments href='" + document.location.href + "' num_posts='10' width='739'></fb:comments>";  
    FB.XFBML.parse(mydiv);  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use this Facebook Login Button code: <div id=fb-root></div> <script src=http://connect.facebook.net/en_US/all.js></script> <script> FB.init({ appId
I have this code to log people in with Facebook: <div id=fb-root></div><script src=http://connect.facebook.net/en_US/all.js#appId=my_app_id&amp;xfbml=1> </script><fb:login-button
i have this code: <html xmlns:fb=https://www.facebook.com/2008/fbml> <body> <script src=http://connect.facebook.net/en_US/all.js></script> <div id=fb-root></div> <script> // assume
I have a html page as below: <div id=test1> <table> <tr> <td><span id=234>ABKO</span></td> </tr>
I have a simple div: <div class=test> <div id=test1></id> <div id=qwerqw></id> ... <div id=23112></id>
I have a HTML structure: <div class=mydiv>xx <span>test1</span> <span>test2</span> <div class=inerdiv> <span>inner span</span> </div>
this is my page Test1.asp <html> <head> <meta http-equiv=Content-Language content=en-us> <meta http-equiv=Content-Type content=text/html; charset=windows-1252>
I am using the facebook connect to login into my website. In my html
I have this page where I am doing testing http://www.comehike.com/test_fb_connect.php The button works fine
I have this website http://smithachallathomas.net63.net/ . Now I am trying to add a share,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.