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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:20:27+00:00 2026-05-25T19:20:27+00:00

The basic idea is to have several questions, but only 1 showing randomly on

  • 0

The basic idea is to have several questions, but only 1 showing randomly on page load. Then whatever answer to that question, will display a download.

The questions load randomly, but when I put in the answer the download doesn’t display. I thought I had all my code correct, but maybe there is a better way to do this. If you could help me out, I’d greatly appreciate it.

P.S. I already know this isn’t a super secure way to hide something, but it doesn’t need to be very secure.

<form id="1">
Enter the 5th word on page 28 to access the download:
<input id="pwd1" name="pwd1" type="text" />
</form>
<form id="2">
Enter the 6th word on page 29 to access the download:
<input id="pwd2" name="pwd2" type="text" />
</form>
<form id="3">
Enter the 4th word on page 30 to access the download:
<input id="pwd3" name="pwd3" type="text" />
</form>
<form id="4">
Enter the 3rd word on page 32 to access the download:
<input id="pwd4" name="pwd4" type="text" />
</form>
<form id="5">
Enter the 5th word on page 33 to access the download:
<input id="pwd5" name="pwd5" type="text" />
</form>
<form id="6">
Enter the 3rd word on page 34 to access the download:
<input id="pwd6" name="pwd6" type="text" />
</form>
<form id="7">
Enter the 5th word on page 35 to access the download:
<input id="pwd7" name="pwd7" type="text" />
</form>
<form id="8">
Enter the 4th word on page 36 to access the download:
<input id="pwd8" name="pwd8" type="text" />
</form>
<form id="9">
Enter the 6th word on page 37 to access the download:
<input id="pwd9" name="pwd9" type="text" />
</form>


<div id="hc" style="display: none;">
<center><a href="sudoku.zip"><img id="download" src="download.png"></a></center>
</div>

<script language="javascript">
var rand = Math.floor(Math.random()*9);
$('form').hide().eq(rand).show();
$('form').keyup(function(){
if($('#pwd1').val() == 'more'){
   $('#hc').show('slow');
}
if($('#pwd2').val() == 'Rectangle'){
   $('#hc').show('slow');
}
if($('#pwd3').val() == 'case'){
   $('#hc').show('slow');
}
if($('#pwd4').val() == 'similarities'){
   $('#hc').show('slow');
}
if($('#pwd5').val() == 'similar'){
   $('#hc').show('slow');
}
if($('#pwd6').val() == 'this'){
   $('#hc').show('slow');
}
if($('#pwd7').val() == 'done'){
   $('#hc').show('slow');
}
if($('#pwd8').val() == 'outside'){
   $('#hc').show('slow');
}
if($('#pwd9').val() == 'completed'){
   $('#hc').show('slow');
}
else{$('#hc').hide();} 
});
</script>
  • 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-25T19:20:28+00:00Added an answer on May 25, 2026 at 7:20 pm

    This would be alot cleaner:

    var rand = Math.floor(Math.random() * 9),
        words = ['more', 'Rectangle', 'case', 'similarities', 'similar', 'this', 'done', 'outside', 'completed'];
    $('form').hide().eq(rand).show();
    $('form input').keyup(function() {
        if (this.value === words[rand])
            $('#hc').show('slow');
    });
    

    Here is a jsFiddle of it working.

    Edit I had the index on words wrong, fixed now.

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

Sidebar

Related Questions

I have several questions involving the interaction between JavaScript and MySQL. The basic idea
the basic idea is that you have some class that has a reference type
I have some basic idea on how to do this task, but I'm not
I have basic idea on Kilo Virtual Machine on Mobiles , I have clear
The basic idea of a masterpage is simple -- you have a block of
Here's the basic idea: There is a java window (main) that opens another java
I have a situation where we have several thousand image files that have become
Possible Duplicate: Datatemplate inheritance I have several data types that are not subclasses, nor
I'm working on a template for a product. The basic idea is to have
References in C++ are baffling me. :) The basic idea is that I'm trying

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.