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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:50:15+00:00 2026-06-13T07:50:15+00:00

I’m not even quite sure how I can make myself clear and I do

  • 0

I’m not even quite sure how I can make myself clear and I do apologize… but I have been searching all over the internet for a similar JavaScript code and I’m not even quite sure how to phrase the question …

Basically, I want the user to input one thing, and I want something else to pop up.

As an example, the user would type in a number, let’s say “10” into a text field or drop-down menu and then three other numbers would pop up, such as 15.25, 16.50, and 17.75 (either in pop window form, or just in a plain sentence, or in other text fields … it doesn’t really matter).

What I’m doing is I want to post an estimate calculator for loan payments on a website (with options for 30 day, 60 day, and 90 day payoff options).

There’s no math involved in this code whatsoever (I understand if I have to input a lot of numbers – I already have those!). I don’t want to create a calculator, because I think a calculator would be more complicated (I’m aiming for simple!) … The loan fees and interest vary from one group of numbers to another, so if it were to be a calculator the script might get really complicated (because we’re not looking at a easy 1 + 1 = 2 equation … it’s more like 1 + 1.50 + 1.00 = 3.50, or 10.00 + 4.00 + 1.25 = 15.25, or even 30.00 + 6.00 + 1.75 etc., there’s no consistency).

So I’m figuring a simpler way around this beast would be to have the numbers readily available, with no calculations. So if they enter in a 1, the result they would get be 3.50, 4.50, and 5.50.

I don’t know, that might be asking a bit much too….

Thank you in advance for your time and 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-06-13T07:50:16+00:00Added an answer on June 13, 2026 at 7:50 am

    In a simplest form it will look like this:

    var magic_box = {
        '1': [3.50, 4.50, 5.50],
        '2': [2.50, 34.50, 5.55],
        '3': [1.50, 0.50, 15.50]
    };
    
    var what = prompt( 'Tell me the magic number!' );
    alert( magic_box[ what ] );
    

    We use hash-map (aka javascript object) each element of which is an array, and each element of those arrays is your desired number.

    Then, we give user a popup with question and store his answer (or his input) into variable.

    Then we use this variable as a key for our hash-map.


    p.s.: there are several issues with solutions above, so its purely for educational reasons.

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
This could be a duplicate question, but I have no idea what search terms
I have a text area in my form which accepts all possible characters from
I'm not entirely sure how I managed to jack this up. http://pretty-senshi.com If you
I have been unable to fix a problem with Java Unicode and encoding. The
Let's say I'm outputting a post title and in our database, it's Hello Y’all
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have just tried to save a simple *.rtf file with some websites and

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.