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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T21:51:29+00:00 2026-05-19T21:51:29+00:00

Just making a very very simple order form. Want a input box ( only

  • 0

Just making a very very simple order form.

Want a input box ( only accept numbers )

User enters a quantity , lets say 50

We have a multiplier value which is lets say 10

Want a disabled form field, showing the result of 50 x 10

So form field would show 500

so now we have variable orderTotal we can pass to our code like:

$txtAmount = "orderTotal";

Any ideas ?

  • 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-19T21:51:30+00:00Added an answer on May 19, 2026 at 9:51 pm

    Code must be somewhat similar. but not tested. if you find error then please let me know

    EDIT:: the tested code

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script>
    <script>
        $(function (){
    
    
        $("#value").blur(
            function(){         
                var value  = $(this).val();
                if(isInt(value)){
                    $("#total").val($(this).val()*$("#quantity").val());                
                }
                else{
                    alert('pelase enter int');
                }       
    
            }
        );
        $('#quantity').change(
            function()
            {
                var value =$("#value").val(); 
                if(isInt(value))
                {
                    if($("#quantity").val() > 0){
                        $("#total").val($(this).val()*$("#value").val());
                    }                       
                }
                else{
                    alert('pelase enter int');
                }
            }
        )
    
        });
    
      function isInt(x) {
       var y=parseInt(x);
       if (isNaN(y)) return false;
       return x==y && x.toString()==y.toString();
      }
    </script>
    
    <form>
        <input id="value" name="value" />
        <select id="quantity">
        <option>10</option>
        <option>20</option>
        <option>30</option>
        <option>40</option>
        <option>50</option>
        </select>       
    </form>
    <input id="total" type="text" disabled="disabled"/>
    

    update:: this should work but not sure .. if not working then let me know

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

Sidebar

Related Questions

I was making this very simple lex program (just an introductory program). But on
I am making a very simple preview window in JQuery using just an ordered
I was recently making a very simple application that just printed matrix-effect out to
I'm very new to WPF, so I've just started making a very simple Memory
I'm making a very simple fishing game. the user has to buy pots, easy
I'm a largely self-taught front-end developer only just making the transition into back-end development
Okay, I think I'm just making a stupid mistake here, but I want to
I am using cakePHP and is making a very simple message board. I came
I built a (very simple) library, which I can call just fine from another
I am making a very simple platform independent(at least that's the plan) console app.

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.