Best Scripting Language for Two Results from a Web Form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DuBose Griffin

    #1

    Best Scripting Language for Two Results from a Web Form

    Greetings. I tried to register but the registration page would not open. I would like to create a web form where a person enters basic information (name etc.) as well as numerical information (sales price). The numerical information will be used to calculate basic mathematical functions. There will also be some drop down menus in this form that will dictate exactly which mathematical calculation will be performed. When the user clicks the submit button, I would like two things to happen.
    1. The numerical results of the calculation and a graphical image of the results (similar to an excel graph) are returned to the web page without any interruption (AJAX?). The graph is based on many behind the scene calculations.
    2. The information in the form along with the results are emailed to the person that filled out the form (email address is one of the form fields) and emailed to the web/company owner (javascript).

    I am basically learning how to do this and I am would like to be directed in the best direction of what coding language to use.

    Thank you,
    DuBose Griffin
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    certainly you will need two things:

    1. JavaScript for the clientside interaction/behaviour handling - especially when you want to use AJAX

    2. a serverside language which will take care of your mail-functions, image-/graph-creation, calculation, etc. - here you might choose from a bunch of possibilities PHP/JSP/ASP(.NET)/Ruby/etc. ... so that would depend on your knowledge and a bit on the server-infrastructure where the app should run on ...

    Comment

    • DuBose Griffin

      #3
      Thank you very much for your reply. So, here is what I plan to do and please comment if I have this straight.

      1. Build a basic HTML form with js on the client side to guide what is input by the user (validation).

      2. When the user clicks the submit button, the PHP scripting will control the email send function and js/ajax will control the calculations on the client side and the return of the information to the web page (calculated number and graph).

      I guess my uneducated question is: "Is this possible to have the submit button perform both a php command and a javascript command? or Is the user going to have to click on two different buttons?

      Thank you,
      DuBose Griffin

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5390

        #4
        when you click a submit button then you might first run a javascript function that could return true or false to avoid/allow the submit ... when you wnat to use ajax, then you wouldn't use a form submit but send the XMLHttpRequest together with the related parameters ...

        Comment

        • rnd me
          Recognized Expert Contributor
          • Jun 2007
          • 427

          #5
          you can also use javascript on the server if you have .net; might be one less thing to learn...

          Comment

          Working...