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

  • SEARCH
  • Home
  • 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 6569675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:39:41+00:00 2026-05-25T14:39:41+00:00

I was wondering if someone could help me here. My code is working just

  • 0

I was wondering if someone could help me here. My code is working just fine in all browsers, but once I get to my facebook app page none of my divs showMsg, showMsg2, try or try1 are showing up. Can someone please help me? Here’s the code….
Actually I’ve since fixed it, I just got rid of && xmlhttp.status==200

<script type=text/javascript>
function get_radio_value()
{
var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
for (var i=0; i < document.plz.myGuess.length; i++)
{
if (document.plz.myGuess[i].checked)
{
var rad_val = document.plz.myGuess[i].value;
var rightAnswer = document.plz.here.value;
var entryID = document.plz.entryid.value;
if (Number(rad_val) == Number(rightAnswer))
{var points=1;
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById('showMsg').innerHTML=xmlhttp.responseText;
document.getElementById('showMsg').style.display = 'block'; 
document.getElementById('try').style.visibility = 'visible'; 

}}}
else { 
var points=0;   
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById('showMsg2').innerHTML=xmlhttp.responseText;
document.getElementById('showMsg2').style.display = 'block';  
document.getElementById('try1').style.visibility = 'visible'; 
}}}}}
xmlhttp.open("GET","/script/facebook/fb_question.php?correct=" + points + "&entryid=" + entryID ,true);
xmlhttp.send();   
}
</script>
{exp:weblog:entries weblog="fbqs" orderby="date" sort="desc" limit="1" disable="member_data|trackbacks"}
<div style="line-height:150%">{fbquestion} <br /><br/>
<form name="plz" >
<input type="hidden" id='here' value='{correct}' />
<input type="hidden" id='entryid' value='{entry_id}' />
<input type="radio" name='myGuess' value='1'  checked="checked" /> {opta}<br />
<input type="radio" name='myGuess' value='2'  /> {optb}<br />
<input type="radio" name='myGuess' value='3'  /> {optc} <br />
<input type="radio" name='myGuess' value='4'  /> {optd} <br/>
<input type="radio" name='myGuess' value='5'  /> {opte}<br/><br/>
<input type='button' onClick='get_radio_value()' value='Guess' >
</form>
<br>
<div id="showMsg" style="display:none; background:url(/images/correct2.gif) no-repeat ;width: 200px; height: 25px;"></div>
<div id="showMsg2" style="display:none; background:url(/images/incorrect2.gif) no-repeat ;width: 200px; height: 25px;"></div>
<br>
<div id="try" style="visibility:hidden;">Read more about the answer <a href="{articleurl}">{article}</a></div>
<div id="try1" style="visibility:hidden;">Find the correct answer here <a href="{articleurl}">{article}</a></div>
{/exp:weblog:entries}
  • 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-25T14:39:41+00:00Added an answer on May 25, 2026 at 2:39 pm

    Your divs only appear if your ajax call returns a status of 200, so the most likely explanation is that you are receiving some other status (404 maybe?). Try displaying the actual status you receive, and check your website error logs for hints.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm just wondering if someone could point me in the right direction here, I
I was wondering if someone could help with with some jquery code for doing
Just wondering if someone could help me with the following issue. On my local
I am wondering if someone could help me with some probably rather simple code,
Hey guys I was wondering if someone could provide a little help. I've been
I'm wondering if someone could look over my code. I'm trying to pass a
I am no css expert so I am wondering whether someone could help. I
was wondering if someone could help with this one. This is the first time
I was wondering if someone could help I've successfully been able to import an
I was wondering if someone could help with an example criteria for nhibernate. I

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.