0

Please can anyone please help me to code a Retail Space Cost Calculator for a shopping complex / mall on a webpage using a HTML form and a Javascript function. I want the user to enter a value for retail space in square feet find its total cost in US dollars. The cost per square feet of retail space is $20.

Thanks in advance, john richards.

1
  • multiply space with $20 ie cost = 20 * space Commented Dec 13, 2013 at 7:33

1 Answer 1

1

It's a small example, using jquery (but you can use javascript as well)

var space = $("#txtSpace").val();
if (Number(space))
{
    $("#txtPrice").val((Number(space)*20).toString());
}

http://jsfiddle.net/cnqjn/

With pure javascript: http://jsfiddle.net/cnqjn/1/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.