• Calculating Form Fields (Frontpage 2000)

    Home » Forums » Developers, developers, developers » Web design and development » Calculating Form Fields (Frontpage 2000)

    Author
    Topic
    #370374

    I have a number of fields in a form and I would like to be able to add up these fields and get a total at the bottom that I can pass both the information from the fields and the total of them to another page

    Viewing 0 reply threads
    Author
    Replies
    • #585846

      Do you need the total to appear before the user submits the form, or can it be calculated on the server and then displayed on the new page? The first requires client-side scripting, such as JavaScript, while the second could be accomplished by a number of different methods. However, I’m not sure if any of those methods are built in to FP’s forms handler.

      • #585857

        Well I would like the total to display on the bottom of the form before submitting then submitting to the next form would calculate things such as shipping and Tax if nessecary. I know some ASP scripting I have a website with all asp pages but the order forms I have in there are for only a few items and then they are calculated on the next page because of quantity. This is a page which has a base computer at ex: $500.00 then upgrades to the system would be extra and I have created drop down fields for the upgrades but if someone choooses the upgrades I need them to calculate so they know the cost before proceeding and then I need the info from those fields and the total cost to appear on another form where they would enter their personal information and then that form would be submitted to proccess at a company like authorize.net.

        Thanks

        • #585859

          I haven’t coded it myself, but I think you tie a script to each control’s onblur event, which should fire when the user exits the control, to run one global routine to recalculate the total. There might be a more sensitive way to do it, that would detect a changed selection in a drop down list, for example, but…it’s all new territory to me.

          You might quickly scan the HTML board for Leif’s posts on JavaScript resources. It’s a good bet that this script already exists out there.

    Viewing 0 reply threads
    Reply To: Calculating Form Fields (Frontpage 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: