1 Reply Latest reply on Sep 21, 2010 12:27 AM by the_shocker

    Problems after clicking on Submit Button in a Form


      Hello folks I'm new to the Forum. I have an IMac with OS 10.6.4 Snow Leopard. I've just completed my first website using dreamweaver CS4 and styled it with CSS. I have also built a simple form using the "Spry validation form" tools with a name and email text elements plus a submit button. When I preview my site in Safari and Firefox and fill in the details with my own name and email address then I click on the Submit button, my "New Message" email window pops up. Is this what should appear?  shouldn't I see a "Form sent" message.


      If a user is filling in the text fields with his details and then clicks the Submit button he should also see "Form sent" message, not his new email window.


      As I haven't uploaded the site yet, I thought I would attach the code.


      My other brief question is, is it wise to preview sites in browsers other than Safari and Firefox


      I would appreciate any help offered.





      <form action="mailto:johnsim7@tpg.com.au" method="get" name="frmRegistration" target="_blank" class="blueCaptions" id="frmRegistration" >

                <span id="sprytextfield1">

                  <label form="name">Name</label>

                  <br />

      <input name="name" type="text" id="name" tabindex="10" size="36"  maxlength="36"/>

      <br />


          <span class="textfieldRequiredMsg">Name required.</span></span>

                <p><span id="sprytextfield2">

                <label for="email">email</label>

                <br />

                <input type="text" name="email" id="email" tabindex="20" size="36

      "  maxlength="36"/>

                <br />

                <span class="textfieldRequiredMsg">A valid email is required.</span><span class="textfieldInvalidFormatMsg">email address incorrect.</span></span></p>


                  <input type="submit" name="submit" id="submit" value="Submit" tabindex="30" />



        • 1. Re: Problems after clicking on Submit Button in a Form
          Level 4

          The reason your form displays an email window with a new, empty compose message is because your form action is set to mailto: this will open the users default email application. Undesired as you've experienced. What you want to do is setup your form method to "post" and set the form "action" to point to a server side script which will process the form data and send an email to the user while displaying a confirmation message on your website. There's a few server side scripting languages to choose from including coldfusion, ASP, php and some other languages. Find out what scripting language your host provides then do a google search for (your chosen language) email form to get more info.


          To answer your second question: It's wise to preview your website in every browser that you intend your visitors to view your website with.

          1 person found this helpful