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 7 of 7
  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    email script that works but with minor problem

    Hi there all,
    I have this script and for too long we have no problems only recently we have this going on!
    First, when someone fills everything in the form below and click to submit , on our end as recipient it seems completely blank.
    Here is what is going on, say one fills every questions at hand and right after -click to submit
    Thereafter an email subpage appears just like when you are sending regular email.
    And since one has filled up all posted questioneer prior and living this subpage blank. It is this email subpage that we receive as blank.
    Can someone fix this for us?
    Like click and it gets through and probably with a thankyou note after submit.
    Please help, really need badly

    <table>
    <FORM NAME="mailform" form ACTION="mailto:support@mydomain?Subject=Comment Product Inquiry" METHOD = "POST" ENCTYPE = "text/plain">
    <INPUT TYPE="hidden" SIZE = 0 NAME="Need Info">



    <tr>
    <td>
    </font><b><font face="times" size="3"
    color="red">__Your Name:__
    <td>
    <INPUT TYPE = "text" NAME = "Name">
    </font><b>
    <BODY OnLoad="document.mailform.Name.focus();">
    <font face="times" size="4"
    color="red">*<TR>
    <td>
    Company </font><font face="times" size="3"
    color="blue">(optional):
    <td>
    <INPUT TYPE = "text" NAME = "Company">
    <tr>
    <td></font><b><font face="Times" size="3"
    color="Red">
    Product Inquiry:
    <td>
    <INPUT TYPE = "text" NAME = "Inquiry">
    <tR>
    <td></font><b><font face="Times" size="3"
    color="Red">
    E-mail #:
    <td>
    <INPUT TYPE = "text" NAME = "Email">
    <tr>
    <td>
    </font><b><font face="Times" size="5"
    color="Red"> Comments:
    <td>
    <TEXTAREA NAME="Comments" COLS=50 ROWS=6>
    </TEXTAREA>
    </table>
    <CENTER>
    <INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Submit">
    <INPUT TYPE = "button" VALUE = "Return to Previous Page" onClick="history.back();">
    </CENTER>
    </FORM>
    </body>
    </html>
    Last edited by ivanhoe; 07-26-2002 at 08:02 AM.

  • #2
    Regular Coder
    Join Date
    Aug 2003
    Location
    Loughborough University
    Posts
    427
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I know that it's been a while since you posted this, but if you still haven't resolved your problem try this.
    Attached Files Attached Files
    AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
    BFG GeForce 6800 Ultra OC 256Mb
    3 * Kingston 256Mb PC3200 DDR400
    Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150

  • #3
    Regular Coder
    Join Date
    Aug 2003
    Location
    Loughborough University
    Posts
    427
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is this the problem line of code?

    Code:
    butt='<scr'+'ipt>function fax(){javascript:print();}</scr'+'ipt><table border="0" width="100%" cellspacing="0" cellpadding="0" align="center"><tr><td width="100%" valign="middle" align="center"><input type="button" value="Print this Form for Faxing" name="FaxDocument" onclick="fax()"><input type="button" value="Submit this Form via Email" name="Email" onclick="javascript:alert(\'DO NOT KNOW HOW TO SOLVE THIS\')"></td></tr></table>';
    If it is then here's what it should be:

    Code:
    butt='<scr'+'ipt type="text/javascript">';
    butt+='function fax(){javascript:print();}';
    butt+='function doalert(){alert("SOLVED (HOPEFULLY)");}';
    butt+='</scr'+'ipt>';
    
    butt+='<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">';
    butt+='<tr><td width="100%" valign="middle" align="center">';
    butt+='<input type="button" value="Print this Form for Faxing" name="FaxDocument" onclick="fax()">';
    butt+='<input type="button" value="Submit this Form via Email" name="Email" onclick="doalert()">';
    butt+='</td></tr></table>';
    AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
    BFG GeForce 6800 Ultra OC 256Mb
    3 * Kingston 256Mb PC3200 DDR400
    Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150

  • #4
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: email script that works but with minor problem

    Originally posted by ivanhoe
    Hi there all,
    I have this script and for too long we have no problems only recently we have this going on!

    First, when someone fills everything in the form below and click to submit , on our end as recipient it seems completely blank.

    Here is what is going on, say one fills every questions at hand and right after -click to submit

    Thereafter an email subpage appears just like when you are sending regular email.

    And since one has filled up all posted questioneer prior and living this subpage blank. It is this email subpage that we receive as blank.

    Can someone fix this for us?
    Like click and it gets through and probably with a thankyou note after submit.
    Please help, really need badly
    I have found that Outlook Express will not
    submit the form contents when using mailto:

    I've been using a workaround which takes the values of the form
    and places those values into a hidden span. The contents of the
    span is then submitted with the form.

    An example can be found here and here.


    .....Willy

  • #5
    Regular Coder
    Join Date
    Aug 2003
    Location
    Loughborough University
    Posts
    427
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ideally, if you were willing to learn some server side code, you could get the results from the form using the post method and use PHP (or some other server side code) to e-mail the results to you.

    Hey Willy, thanks for the new forum for me to mess around in.
    AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
    BFG GeForce 6800 Ultra OC 256Mb
    3 * Kingston 256Mb PC3200 DDR400
    Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150

  • #6
    New Coder
    Join Date
    Jul 2002
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey lavalamp,
    Your email txt file attachment for some reason I could not download or open it.

    Willy, yours too! Your two samples won't direct me to it or open it.
    But it would be swell if mailto could be open through IE, I can used a side server but I got to see frist what those 2 samples are.

    Lavalamp, you are right these is where my problem is
    and if I do understand Willy, it will really be beneficial to
    open the file through IE and I sure need your help where
    or how it would work with all the details if you can.
    Say if click submit, and my email sample is http://myemail.com
    and just the sample you did below didn't work either much as
    with the print section when clicked.

    >>>butt='<scr'+'ipt type="text/javascript">';
    butt+='function fax(){javascriptrint();}';
    butt+='function doalert(){alert("SOLVED (HOPEFULLY)");}';
    butt+='</scr'+'ipt>';

    butt+='<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">';
    butt+='<tr><td width="100%" valign="middle" align="center">';
    butt+='<input type="button" value="Print this Form for Faxing" name="FaxDocument" onclick="fax()">';
    butt+='<input type="button" value="Submit this Form via Email" name="Email" onclick="doalert()">';
    butt+='</td></tr></table>';


    ""THANKS""

  • #7
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by ivanhoe
    Willy, yours too! Your two samples won't direct me to it or open it.
    But it would be swell if mailto could be open through IE, I can used a side server but I got to see frist what those 2 samples are.
    I just checked your demo page and did not see any changes which included any type of form handling. Please post what you have which shows how you tried to implement passing the form data using hidden spans.

    If you are trying to pass the complete Table structure you generate. You better use Server Side form handling. If you try to do this with mailto: what you recieve will not be rendered as HTML but rather as text/plain with all of the tags appearing in the body of your message.

    The below script will do exactly that.
    Code:
    <script type="text/javascript">
    <!--//
    function submitData() {
    var me = 'YOU';
    var at = '@';
    var site = 'YOUR_DOMAIN.com';
    var to = me+at+site;
    var sub  =  'MY ORDER FORM RESULTS';
    
    var paras = document.getElementsByTagName('form');
    var msg = "";
    for (var i = 0; i < paras.length; i++)
    msg += paras[i].innerHTML + '\n';
    msg = (escape(msg));
    document.forms[0].action="mailto:"+to+"?subject="+sub+"&body="+msg;
    document.forms[0].submit();
    }
    // -->
    </script>
    Good Luck;
    .....Willy
    Last edited by Willy Duitt; 12-04-2003 at 12:57 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
    •