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 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy form not emailing me on submit

    i have a form on mysite heres a link to the offending form mysite


    the problem im having is that when u click submit the form s not emailing me here is the code from the form



    <FORM action="" NAME="S_7 Form" target="_self" onSubmit="return myfunction(this.form)">
    <p class="style31"><span class="style11">-<strong>Recruitment
    Form</strong>: Personal Info </span><br>
    <script language="JavaScript">
    function myfunction(form)
    {
    ...
    <form method="post" action="mailto:******@hotmail.com";>
    return true;
    }
    </script>
    <br>
    <span class="style11">-Alias:</span>
    <input name="textarea" type="text" value="">
    <span class="style11">-Age: </span>
    <select name="select3" size="1" multiple>
    <option>18-25</option>
    <option>26-35</option>
    <option>36+</option>
    </select>
    <br>
    <br>
    <span class="style11">-Email:</span>
    <input name="textarea2" type="text" value="">
    <span class="style11">-Gender:</span>
    <select name="select4" size="1" multiple>
    <option>Male</option>
    <option>Female</option>
    </select>
    <br>
    <span class="style11">------------------------------------------------------------------------<strong>Recruitment
    Form</strong>: General Info</span><span class="style1"><br>
    <br>
    </span>-<span class="style11">TeamSpeak:</span>
    <select name="select" size="1" multiple>
    <option>Yes</option>
    <option>No</option>
    </select>
    <span class="style11">-Willing To Donate:</span>
    <select name="select2" size="1" multiple>
    <option>Yes</option>
    <option>No</option>
    </select>
    <br>
    <br>
    <strong class="style11">Submit: </strong> <label>
    <input name="Submit" type="submit" onClick="MM_popupMsg('Thankyou For Completing Our Recruitment Form.');MM_goToURL('parent','http://www.rasin-hell.com/S_7/ct/index.html');return document.MM_returnValue" value="Submit">
    <span class="style11"><strong>Reset</strong>: </span>
    <input type="reset" name="Submit2" value="Reset">
    </form>


    thankz in advance rasin
    Last edited by rasin_hell; 08-16-2005 at 07:33 PM.

  • #2
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    <script language="JavaScript">
    function myfunction(form)
    {
    ...
    <form method="post" action="mailto:******@hotmail.com";>
    return true;
    }
    </script>


    That isn't even valid script. You can't just stick html in script like that.
    What are you trying to do here? Besides break the form for everyone who doesn't have an e-mail client configured, I mean.
    If you want to set form attributes in a function, set them like so:

    form.action = "newActionPage.asp";
    form.target = "_self";

    <select name="select4" size="1" multiple>

    Wow, male AND female!

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #3
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It should be this..

    Code:
    <FORM action="mailto:***@hotmail.com" method="post"  NAME="S_7 Form" onSubmit="return myfunction(this.form)">
    <p class="style31"><span class="style11">-<strong>Recruitment 
    Form</strong>: Personal Info </span><br>
    <br>
    <span class="style11">-Alias:</span> 
    <input name="textarea" type="text" value="">
    <span class="style11">-Age: </span> 
    <select name="select3" size="1" multiple>
    <option>18-25</option>
    <option>26-35</option>
    <option>36+</option>
    </select>
    <br>
    <br>
    <span class="style11">-Email:</span> 
    <input name="textarea2" type="text" value="">
    <span class="style11">-Gender:</span> 
    <select name="select4" size="1" multiple>
    <option>Male</option>
    <option>Female</option>
    </select>
    <br>
    <span class="style11">------------------------------------------------------------------------<strong>Recruitment 
    Form</strong>: General Info</span><span class="style1"><br>
    <br>
    </span>-<span class="style11">TeamSpeak:</span> 
    <select name="select" size="1" multiple>
    <option>Yes</option>
    <option>No</option>
    </select>
    <span class="style11">-Willing To Donate:</span> 
    <select name="select2" size="1" multiple>
    <option>Yes</option>
    <option>No</option>
    </select>
    <br>
    <br>
    <strong class="style11">Submit: </strong> <label>
    <input name="Submit" type="submit" onClick="MM_popupMsg('Thankyou For Completing Our Recruitment Form.');MM_goToURL('parent','http://www.rasin-hell.com/S_7/ct/index.html');return document.MM_returnValue" value="Submit">
    <span class="style11"><strong>Reset</strong>: </span> 
    <input type="reset" name="Submit2" value="Reset">
    </form>

  • #4
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    added code still wont work

  • #5
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question

    ok folks i changed my code it works fine for me but not everyone who hasnt an email client set up so how do i go about breaking the code so everyone can use this form with or without mail client i can use my website mail server to send them but have no idea on the coding a speedy reply would be nice as ive been tryin to get this to work for past 2 months regards and tkz

    form is here

    <FORM action="mailto:webmaster@********.com?subject=clan submission" method="post" enctype="text/plain" "newActionPage.asp" target="_self" onSubmit="return myfunction(this.form)">
    <p class="style31"><span class="style11">-<strong>Recruitment
    Form</strong>: Personal Info </span><br>
    <br>
    <span class="style11">-Alias:</span>
    <input name="name" type="text" SIZE=20 value="">
    <span class="style11">-Age: </span>
    <select id=Age size=1
    name=Age>
    <option value="NO ANSWER" selected>please choose</option>
    <option value="18 to 24">18 to 24
    <option value="26 to 30">25 to 30
    <option
    value="31 to 40">31 to 40
    <option value="41 to 50">41 to 50
    <option value="51 to 60">51 to 60
    <option
    value=61+>61+
    </select></select>
    <br>
    <br>
    <span class="style11">-Email:</span>
    <input name="email" type="text" size=20"">
    <span class="style11">-Sex:</span>
    <SELECT id=Sex size=1
    name=Sex> <OPTION value="no answer" selected>please choose</OPTION>
    <OPTION value="Male">Male<OPTION
    value="Female">Feamle</OPTION></SELECT>



    <br>
    <span class="style11">------------------------------------------------------------------------<strong>Recruitment
    Form</strong>: General Info</span><span class="style1"><br>
    <br>
    <span class="style11">TeamSpeak:</span>
    <select id="Teamspeak" size="1"
    name=Teamspeak> <OPTION value="no answer" selected>please choose</OPTION>
    <option value="yes">yes<OPTION
    value="no">no</OPTION></SELECT>

    <span class="style11">-Donate:</span>
    <select id="donate" size="1"
    name=donate> <OPTION value="no answer" selected>please choose</OPTION>
    <option value="yes">yes<OPTION
    value="no">no</OPTION></SELECT>
    </select>
    <br>
    <br>
    <strong class="style11">Submit: </strong> <label>
    <input name="Submit" type="submit" value="Submit">
    <span class="style11"><strong>Reset</strong>: </span>
    <input type="reset" name="Submit2" value="Reset">
    </form>
    Last edited by rasin_hell; 09-17-2005 at 05:44 PM.

  • #6
    Regular Coder
    Join Date
    Jul 2005
    Posts
    352
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Use a CGI script and not mailto:. The mailto: ink opens the default email client. There are many free CGI scripts out there or you could make you own (if your server allows it)


  •  

    Posting Permissions

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