www.webdeveloper.com
Results 1 to 4 of 4

Thread: Basic Calcualtions

  1. #1
    Join Date
    Jan 2006
    Posts
    63

    Basic Calculations

    Hello,


    I am new here and let me say that i have already done some readinf based on other thread titles, and i am already learning alot

    THANK YOU SO MUCH FOR HAVING THIS WONDERFULL SITE.

    I hope to be here for a long time.


    I am in disperate need for help with this small problem
    I am using HTML. I hope HTML can do what i want. lol

    I have 2 text boxes where user can input information (numbers)

    textbox 1 "TotalNum"
    textbox 2 "Active"

    when the user inputs these two numbers, they would click the button "calculate" page "Results.Html" would open.

    the results would be caclulated as follows

    the percentage of active people from the Total Num
    the percentage of inactive people ( percentage of active people (minus) 100%.

    I would like for the results to show up in a sentence format
    example
    "You currently have XX% active and a XX% of inactive people."


    thank you very much for reading my post


    NOTE,

    if the active num is higher than the TotalNum, i would like the result to open an error page
    CaculatorError.html (already designed)
    same if one of the textboxes is missing a value






    Thank you all for any help that you may provide.

    If this seems to be more work that reasonable to ask for, where can i get samples for that kind of issue

    THANK YOU ALL SO MUCH.
    Last edited by USER4FUN; 01-19-2006 at 08:21 PM.

  2. #2
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    HTML can't do it alone. At the very least you'll have to use Javascript to do that calculation.
    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan

  3. #3
    Join Date
    Oct 2005
    Location
    Gold Coast, Australia
    Posts
    2,115
    HTML is only a Markup Languge, you should use some server-side language to do that

  4. #4
    Join Date
    Jan 2006
    Posts
    63
    would javascript do that
    if yes

    what would the code look like

    thank you

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles