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 748767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:21:28+00:00 2026-05-14T14:21:28+00:00

A friend has pointed me to his old website and says the submit form

  • 0

A friend has pointed me to his old website and says “the submit form just stopped working a while ago. I’m sure it’s something simple.”

The form asks a child for a certain word from a book, and based on the answer, it should redirect the child to a success page or a failure page. It’s using Javascript 1.2, circa 2001.

You can see this form in in-action at:

http://www.secrethidingplaces.com/login1.html

Any idea why it’s failing?

The HTML does this:

<script src="password.js" type="text/javascript" language="JavaScript1.2">
</script>

<script type="text/javascript" language="JavaScript1.2">
<!--

function showRightPage ()
{
return window.location.href = "extra.html" ;
}

function showWrongPage ()
{
 return window.location.href = "sorry2.html" ;
}

//-->
</script>

and then this:

document.write ( '<form name="questionForm" action="javascript:checkAnswer()" method="post">' ) ;
...
document.write ( '<input type="text" name="userAnswer" value="" size="90">' ) ; 
document.write ( '<INPUT TYPE="image" NAME="submit" SRC="stock/btn_send.gif" width="121" height="41" BORDER="0" ALT="submit">' ) ;
document.write ( '\</p>' ) ;
document.write ( '\</form>' ) ;

I’m assuming there’s something ugly in CheckAnswer from ./password.js . I can hack the form to bypass that javascript and go straight to the success page:

 document.write ( '<form name="questionForm" action="extra.html" method="post">' ) ;

but I’d like to help my friend get his kids site working again. The CheckAnswer function is below. Is something going wrong in here?

function checkAnswer ()
{
 currentAnswer = answersArray [ choiceNumber ] ;

 if (agt.indexOf("msie") != -1)
 {
  rawAnswer = document.questionForm.userAnswer.value ;
 }
 else
 {
  rawAnswer = document.callThis.document.questionForm.userAnswer.value ;
 }

 lcAnswer = rawAnswer.toLowerCase ( ) ;
 includedAnswer = lcAnswer.indexOf ( "currentAnswer" ) ;
 zadaAnswer = lcAnswer.indexOf ( "zada" ) ;
 brendanAnswer = lcAnswer.indexOf ( "brendan" ) ; 
 nineAnswer = lcAnswer.indexOf ( "nine" ) ;
 thirtyAnswer = lcAnswer.indexOf ( "thirty" ) ;

 if ( choiceNumber == 0 )
 {  
  if ( includedAnswer == -1 && zadaAnswer == -1  && brendanAnswer == -1 )
  {
   checked = "wrong" ;
  }
 }
 if ( choiceNumber == 8 )
 {  
  if ( includedAnswer == -1 && zadaAnswer == -1  && nineAnswer == -1 )
  {
   checked = "wrong" ;
  }
 }
 if ( choiceNumber == 16 )
 {  
  if ( includedAnswer == -1 && zadaAnswer == -1  && thirtyAnswer == -1 )
  {
   checked = "wrong" ;
  }
 }
 if ( choiceNumber != 0 && choiceNumber != 8 && choiceNumber != 16 )
 {  
  if ( includedAnswer == -1 && zadaAnswer == -1 )
  {
   checked = "wrong" ;
  }
 }

 if ( checked == "wrong" )
 {  
  showWrongPage () ;
 }
 else
 {
  showRightPage () ;
 }
}

Thanks!

  • 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-14T14:21:29+00:00Added an answer on May 14, 2026 at 2:21 pm

    It fails here:

    document.callThis.document.questionForm.userAnswer.value ;

    document.callThis is undefined, I have never seen that function.

    You can probably replace

    if (agt.indexOf("msie") != -1)
        {
        rawAnswer = document.questionForm.userAnswer.value ;
        }
    else
        {
            rawAnswer = document.callThis.document.questionForm.userAnswer.value ;
        }
    

    Simply replace it with:

    rawAnswer = document.questionForm.userAnswer.value ;

    I only tested this quickly in Firefox but I don’t see why it wouldn’t work elsewhere.

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

Sidebar

Related Questions

My friend has a website built on wordpress and the developer has left the
A friend has asked me to look into developing a custom system for his
A friend of mine has inherited an old Joomla 1.0.x site, that amongst other
My friend says that Django only has 1 thread or something? And I have
I have a friend who's using FluxBB and he has just installed a modification
My friend has sent me his crash log and I tried to symbolicate it
If my friend has a git repository on his laptop, and we are both
Is there anyway to just see how many friends that friend has? Example: My
So I've been working with Django-comments and I'm pretty happy, but a friend pointed
A friend has developed a corporate website which has a mailto link as the

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.