• Send e-mail using client side Java script

    Home » Forums » Developers, developers, developers » Web design and development » Send e-mail using client side Java script

    Author
    Topic
    #399547

    Does anyone know how to send an e-mail with form information using client-side java script? I know this is sort of a strange questions but it’s for a class I’m taking and we can’t use any server side scripting. Any information, web sites, etc. would be helpful at this point!

    Many thanks,
    Shane

    Viewing 2 reply threads
    Author
    Replies
    • #772595

      You can post a form to an email address, although I haven’t done this for years… I don’t remember the details, such as whether you need to set SMTP server details or not.

      Although you will never have the flexibility of Server-side scripting, you can use the method mentioned above like this:

      As for a javascript method, I’m not aware of anything that would be easy to use. Maybe another lounger will have a suggestion for this.

    • #772829

      You could dynamically build a mailto link with JavaScript, and then use JavaScript to “click” it (have I done that, or was I clicking a button?), but otherwise you have to know a huge amount about the mail facilities of the server…

      (Looking up code…)

      I made a page with radio buttons, the user chose one and this automatically submitted the form with that option. The code for one of the radio buttons was:

      Exact client code

      SearchSubmit is the NAME attribute of the Submit button. I wonder… could you send a click event to a mailto link?

      Look forward to seeing your progress on this.

      • #772966

        Many thanks to both of you. I’ll give it a try and see what I can come up with.

        Thanks,
        freemans

      • #772967

        Many thanks to both of you. I’ll give it a try and see what I can come up with.

        Thanks,
        freemans

    • #772830

      You could dynamically build a mailto link with JavaScript, and then use JavaScript to “click” it (have I done that, or was I clicking a button?), but otherwise you have to know a huge amount about the mail facilities of the server…

      (Looking up code…)

      I made a page with radio buttons, the user chose one and this automatically submitted the form with that option. The code for one of the radio buttons was:

      Exact client code

      SearchSubmit is the NAME attribute of the Submit button. I wonder… could you send a click event to a mailto link?

      Look forward to seeing your progress on this.

    Viewing 2 reply threads
    Reply To: Send e-mail using client side Java script

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

    Your information: