www.webdeveloper.com
Results 1 to 5 of 5

Thread: Javascript program help

  1. #1
    Join Date
    Aug 2009
    Posts
    3

    Javascript program help

    have to design a javascript program to capture five different numbers (monetary values), and save it in memory. Then another one that converts that value to, let's say, Euros, and display interest and commisions (which are values I'll have to add later, but the actual coding for the calculation is what's confusing to me. Let's just say, take 10% out of the initial value for interest, and 15% for commission). I would appreciate any help

  2. #2
    Join Date
    Aug 2009
    Location
    Earth, Solar System
    Posts
    11
    What do you think you need to do first? Here's a couple question to ask yourself about his problem. Do I need user input? How can I store it after that? How can I display it? Small questions like these when programming gives you good practice to start of with. Then you can slowly migrate other features to it.

    Hope this gives you a good start even though there is no code.

  3. #3
    Join Date
    Aug 2009
    Posts
    3
    Hi, thanks for the reply.

    Ok here's what I do know what to do:

    I know how to ask for those first 5 values and store them, what I'm having trouble with is the second part, where I have to not only take out some percentages from the initial value (that's the easy part), but ALSO convert it to another monetary value which the user has to choose.

    That's what I'm not really clear on how to do. I can definitely make it so that it converts it automatically to Yen, for example, but I don't know how to give the user the choice of what type of monetary value to convert it to.

  4. #4
    Join Date
    Aug 2009
    Posts
    20
    Seems like you'll want some kind of dropdown box or a set of radio buttons on your input form, with a list of the available currencies. You can use the element's value property to figure out what currency the user selected. Calculate your answer in some base currency like Yen, then use the exchange rate between Yen and your desired currency.

    I'm making an assumption in that last part: that converting to Yen and then to your desired currency yields the same result as a direct conversion. You'll need to confirm that to use this technique...

  5. #5
    Join Date
    Aug 2009
    Posts
    3
    Quote Originally Posted by solowandererY2K View Post
    Seems like you'll want some kind of dropdown box or a set of radio buttons on your input form, with a list of the available currencies. You can use the element's value property to figure out what currency the user selected. Calculate your answer in some base currency like Yen, then use the exchange rate between Yen and your desired currency.

    I'm making an assumption in that last part: that converting to Yen and then to your desired currency yields the same result as a direct conversion. You'll need to confirm that to use this technique...
    Yeah I'm pretty sure that's exactly what should work. The only confusing part for me is how to actually write the code for it.

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