Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form data from javascript

    Hello,

    I used a standard orderform which I expanded. With this form people can order some products. But when I submit the form with data from a javascript the mail is empty. Can anyone help? I am just a beginner....

    You can try the form here

    Thanks in advance!

    Hein.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,992
    Thanks
    203
    Thanked 2,536 Times in 2,514 Posts
    <! A real form would require METHOD = and ACTION= attributes in the FORM tag below ><! to ensure that the data gets sent somewhere. The contents of the tag would be something ><! like FORM name="ordform" METHOD="POST" ACTION="youremailaddress" where youremailaddress ><! really is your e-mail address. However, even that would work only if your ISP supports ><! the use of mailto: in a form tag. If in doubt, contact your ISP for specifics. >ACTION="mailto:hein.reumkens@gmail.com"


    The trouble with using this method (mailto) to send form results is its unpredictability. The method it is highly dependent on the browser in use and the email client in use (some people have only Yahoo or Hotmail). In particular, your visitor must have Outlook or Outlook Express as the default client for this to work correctly. Even if your visitor is using Internet Explorer, but the default mail client is different (e.g. Eudora), your mailto form will not work. With all of the browser troubles, you're likely to lose about half of your users' messages. Most of the email clients that can successfully send a mail will prompt the user by a security dialog prior to sending - this can scare many users from continuing. Also, what about people with Javascript disabled?

    In fact few browsers these days accept mailto: as a form action. You need a really old browser for it to work as more modern browsers simply open the email program (if any) and ignore the form. If you are going to use a form then use a server-side formmail script as the action - there are several good free ones out there.

    In any case I have the idea that gmail does not support mailto:.

    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
    Last edited by Philip M; 07-29-2010 at 07:56 PM.


  •  

    Posting Permissions

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