SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Form Problems

  1. #1
    SitePoint Enthusiast jetzyjezter's Avatar
    Join Date
    Jul 2002
    Location
    MT, USA
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Form Problems

    Go To http://www.rolandcheek.com/order_online.shtml

    When you are there choose three books, in the first three drop downs

    Then, enter a quantity for each. THis is where the first problem occurs. If a person were to want 2 of 1 kind of book , and the book cost 19.95, the form would put 39.9 in the Total area. It needs to be 39.90. Say the person wanted three books at 19.95 each, the total from the form would be 59.849999999999994, it needs to round that to 59.85.

    The second error comes about when you click the "Get total!"
    button. Instead of adding the numbers it sticks them side by side.

    Please try this out and mabey even give the coding a look(parts of it are done with javascript)and tell me what you think i could do to fix it.

    Thanks for your help,

    Brandon

  2. #2
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    420
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.sitepointforums.com/showt...threadid=52488

    That thread should help you out.

    As for the addition problems try wrapping an eval() around the variable you want to add.

    Code:
    eval(document.form.one.value)+eval(document.form.one.value);
    Wavelan

  3. #3
    SitePoint Enthusiast jetzyjezter's Avatar
    Join Date
    Jul 2002
    Location
    MT, USA
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    im still having trouble

    for some reason i cant get it to work, any ideas? will someone go throught the code with me, mabey talking through a instant messenger or sumthing

    brandon


Bookmarks

Posting Permissions

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