Jump to content

Form Is Not Submitting!


yrstruly
 Share

Recommended Posts

HalloCan somebode please help me. This code underneath is a code for a form, and the form is suppose to submitt the given details. Can somebody please take a look and see if i have misplaced something ect?Thank youAnthony<div id="enquiry"><h3>Quick Travel Enquiry Form</h3> <form action="sendemail.php" method="POST" name="form1"onSubmit="MM_validateForm('name','','R','email','','RisEmail');return document.MM_returnValue"> <table> <tr><th>Full Name *</th></tr> <tr><td><input name="fullname" type="text" value=""></td></tr> <tr><th>Email *</th></tr> <tr><td><input name="email" type="text" value=""></td></tr> <tr><th>Contact number </th></tr> <tr><td><input name="contactphone" type="text" value=""></td></tr> <tr><th>Country of residence</th></tr> <tr><td><input name="country" type="text" value=""></td></tr> <tr><th>Arrival date</th></tr> <tr><td><select name="arrivalday"> <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 <option value="521">21 <option value="22">22 <option value="23">23 <option value="24">24 <option value="25">25 <option value="26">26 <option value="27">27 <option value="28">28 <option value="29">29 <option value="30">30 <option value="31">31 </select> <select name="arrivalmonth"> <option value="Jan">Jan <option value="Feb">Feb <option value="Mar">Mar <option value="Apr">Apr <option value="May">May <option value="Jun">Jun <option value="Jul">Jul <option value="Aug">Aug <option value="Sep">Sep <option value="Oct">Oct <option value="Nov">Nov <option value="Dec">Dec </select> <select name="arrivalyear"> <option value="2008">2008 <option value="2009">2009 <option value="2010">2010 <option value="2011">2011 <option value="2012">2012 </select></td></tr> <tr><th>Departure date</th></tr> <tr><td><select name="departureday"> <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 <option value="521">21 <option value="22">22 <option value="23">23 <option value="24">24 <option value="25">25 <option value="26">26 <option value="27">27 <option value="28">28 <option value="29">29 <option value="30">30 <option value="31">31 </select> <select name="departuremonth"> <option value="Jan">Jan <option value="Feb">Feb <option value="Mar">Mar <option value="Apr">Apr <option value="May">May <option value="Jun">Jun <option value="Jul">Jul <option value="Aug">Aug <option value="Sep">Sep <option value="Oct">Oct <option value="Nov">Nov <option value="Dec">Dec </select> <select name="departureyear"> <option value="2008">2008 <option value="2009">2009 <option value="2010">2010 <option value="2011">2011 <option value="2012">2012 </select></td></tr> <tr><th>Areas you want to visit</th></tr> <tr><td><input name="areas" type="text" value=""></td></tr> <tr><th>Number of travelers</th></tr> <tr><td><input name="partysize" type="text" value=""></td></tr> <tr><th>Room type (single/double/twin/family)</th></tr> <tr><td><input name="roomtype" type="text" value=""></td></tr> <tr><th>Budget per day or indication of standard (i.e. 2,3,4,5 star)</th></tr> <tr><td><input name="budget" type="text" value=""></td></tr> <tr><th>Special interests</th></tr> <tr><td><input name="specialinterest" type="text" value=""></td></tr> <tr><th>Any additional info/comments/requests</th></tr> <tr><td><input name="otherinfo" type="text" value=""></td></tr> </table> <input type="submit" value="Submit" class="submit" /><input name="Reset" value="Reset" type="reset"> <input name="redirect" type="hidden" value="thanks.html"> <input name="emailaddress" type="hidden" value="luke@africabespoke.com,michaela@africabespoke.com,carola@africabespoke.com"></form> </div>

Link to comment
Share on other sites

Are you sure that the onsubmit javascript is ok, you could try removing it and seeing if it is the cause.
HalloThank you for the reply. Does it mean i should delete that whole line after the "onsubmit", can you please just indicate, as im new to this so i dont quite understand what you are refering too?Thank you
Link to comment
Share on other sites

The form is fine. So the problem is probably with your javascript. You should make sure you are passing the correct values to MM_validateForm(), and you should alert the value of document.MM_returnValue. It it returns false, or empty, something is wrong.

Link to comment
Share on other sites

The form is fine. So the problem is probably with your javascript. You should make sure you are passing the correct values to MM_validateForm(), and you should alert the value of document.MM_returnValue. It it returns false, or empty, something is wrong.
Thank you so much for your reply, and i know it is very helpfull, only if i knew what the hec was going on :)
Link to comment
Share on other sites

The javascript I am referring to is old Macromedia code. Are you using Macromedia Dreamweaver? do you have a javascript file with MM_validateForm() in it. Or maybe did you just copy and paste some of this form into your document?If you are not interested in validating your form, just the entire everything in your <form> tag from onSubmit to the end.And be careful about copying and pasting.

Link to comment
Share on other sites

The javascript I am referring to is old Macromedia code. Are you using Macromedia Dreamweaver? do you have a javascript file with MM_validateForm() in it. Or maybe did you just copy and paste some of this form into your document?If you are not interested in validating your form, just the entire everything in your <form> tag from onSubmit to the end.And be careful about copying and pasting.
HiThank you so much for everyting so far. I do have some javascript in my code. I didnt wright the code, im just testing it, it was sent to me, cause it dont do what its suppose to do. I have given the whole code of that page underneath. Would you take a look at it, the javascript is at the bottom, should i remove that script also?<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="keywords" content="Bespoke Travel, Custom Vacation Packages, Southern Africa, South Africa" /><meta name="description" content="Southern African custom made vacation packages. Contact us now to arrange your very own bespoke holiday." /><!--Actual Information--> <meta http-equiv="expires" content="43200" /><meta name="revisit-after" content="7 days" /><!--Spiders--><meta name="ROBOTS" content="INDEX" /><meta name="ROBOTS" content="FOLLOW" /><meta name="ROBOTS" content="NOIMAGEINDEX" /><meta name="ROBOTS" content="NOIMAGECLICK" /><meta name="googlebot" content="archive,follow" /><title>Africa Bespoke - South African Custom Vacation Packages</title><link rel="stylesheet" type="text/css" media="screen,print" href="../css/style.css" /><script type="text/javascript"><!--//--><![CDATA[//><!--sfHover = function() { var sfEls = document.getElementById("nav").getElementsByTagName("LI"); for (var i=0; i<sfEls.length; i++) { sfEls.onmouseover=function() { this.className+=" sfhover"; } sfEls.onmouseout=function() { this.className=this.className.replace(new RegExp(" sfhover\\b"), ""); } }}if (window.attachEvent) window.attachEvent("onload", sfHover);function switchMenu(obj) { var el = document.getElementById(obj); if ( el.style.display != "none" ) { el.style.display = 'none'; } else { el.style.display = ''; }}//--><!]]></script></head><body><div id="wrap"> <!--Header--> <div id="header" onclick="location.href='http://www.africabespoke.com';" style="cursor: pointer;"> <h1><img src="../images/tailor-made-travel.gif" alt="Africa Bespoke Custom Travel Packages" width="462" height="99" /></h1> </div><!-- * end page header * --><!-- * navigation * --> <p class="childhead"></p> <div id="nav"> <ul> <li class="active"><a href="../index.html">Home</a></li> <li><a href="/">Travel Destinations</a> <ul> <li class="childhead"><a href="../travel-destinations/southern-africa/index.html" class="childnav">SOUTHERN AFRICA</a></li> <li><a href="../travel-destinations/southern-africa/botswana.html" class="childnav">BOTSWANA</a></li> <li><a href="../travel-destinations/southern-africa/malawi.html" class="childnav">MALAWI</a></li> <li><a href="../travel-destinations/southern-africa/mozambique.html" class="childnav">MOZAMBIQUE</a></li> <li><a href="../travel-destinations/southern-africa/namibia.html" class="childnav">NAMIBIA</a></li> <li><a href="../travel-destinations/southern-africa/south-africa.html" class="childnav">SOUTH AFRICA</a></li> <li><a href="../travel-destinations/southern-africa/zambia.html" class="childnav">ZAMBIA</a></li> <li><a href="../travel-destinations/southern-africa/zimbabwe.html" class="childnav">ZIMBABWE</a></li> <li class="childhead"><a href="../travel-destinations/east-africa/index.html" class="childnav">EAST AFRICA</a></li> <li><a href="../travel-destinations/east-africa/kenya.html" class="childnav">KENYA</a></li> <li><a href="../travel-destinations/east-africa/tanzania.html" class="childnav">TANZANIA</a></li> <li><a href="../travel-destinations/east-africa/uganda.html" class="childnav">UGANDA</a></li> <li><a href="../travel-destinations/east-africa/zanzibar.html" class="childnav">ZANZIBAR</a></li> <li class="childhead"><a href="../travel-destinations/indian-ocean-islands/index.html" class="childnav">INDIAN OCEAN ISLANDS</a></li> <li><a href="../travel-destinations/indian-ocean-islands/madagascar.html" class="childnav">MADAGASCAR</a></li> <li><a href="../travel-destinations/indian-ocean-islands/mauritius.html" class="childnav">MAURITIUS</a></li> <li><a href="../travel-destinations/indian-ocean-islands/seychelles.html" class="childnav">SEYCHELLES</a></li> </ul> </li> <li><a href="../bespoke-tours/index.html">Bespoke Tours</a> <ul> <li><a href="../bespoke-tours/honeymoon.html" class="childnav">Honeymoon</a></li> <li><a href="../bespoke-tours/safari.html" class="childnav">Safari</a></li> <li><a href="../bespoke-tours/beach.html" class="childnav">Beach</a></li> <li><a href="../bespoke-tours/family.html" class="childnav">Family</a></li> <li><a href="../bespoke-tours/adventure.html" class="childnav">Adventure</a></li> <li><a href="../bespoke-tours/golf.html" class="childnav">Golf</a></li> <li><a href="../bespoke-tours/groups.html" class="childnav">Groups</a></li> </ul> </li> <li><a href="../travel-specials/specials.html">Travel Specials</a></li> <li><a href="http://blog.africabespoke.com/" target="_blank">Travel Blog</a></li> <li><a href="/">About</a> <ul> <li><a href="../about-africa-bespoke/about.html" class="childnav">About Us</a></li> <li><a href="../about-africa-bespoke/travel-consultants.html" class="childnav">Consultants</a></li> </ul> </li> <li><a href="/">Contact</a> <ul> <li><a href="contact.html" class="childnav">Contact Us</a></li> <li><a href="feedback.html" class="childnav">Feedback</a></li> </ul> </li> </ul> </div><!-- * end navigation * --> <div id="mainbody"> <div id="messagebox"> <img src="../images/spacer.gif" width="650" height="15" border="0"/> </div><!-- * content * --> <div id="contentbox"><!-- * inner content * --> <div id="content"> <h1>CONTACT US</h1> <div align="justify"><br /> If you need any further information please do not hesitate to contact us.<br /> <b>Tel  </b>+27 (0)21 674 5820<br /> <b>Fax  </b>+27 (0)21 683 0816<br /> <b>Email  </b>info@africabespoke.com<br /> <b>Street  </b>120 Belvedere Road, Claremont, Cape Town, South Africa</strong><br /> <b>Post  </b>Suite 231, Private Bag x18, Rondebosch, 7701, Cape Town, RSA<br /> <br /> The more information you can give us about your ideas and expectations, the easier it is for us to propose the right journey and travel solution for you. Please provide us with info on the number of people, the time of year, the length of time you have available, if you prefer to drive or fly (or both), if you want a guide and of course what kind of budget you have. Budget can be a figure per day or an indication of your preference of accommodation (2/3/4/5 star). With this in mind, please fill in the form below. Note: fields marked with * are compulsory.<br /><br /> </div> <div id="enquiry"><h3>Quick Travel Enquiry Form</h3> <form action="sendemail.php" method="POST" name="form1"onSubmit="MM_validateForm('name','','R','email','','RisEmail');return document.MM_returnValue"> <table> <tr><th>Full Name *</th></tr> <tr><td><input name="fullname" type="text" value=""></td></tr> <tr><th>Email *</th></tr> <tr><td><input name="email" type="text" value=""></td></tr> <tr><th>Contact number </th></tr> <tr><td><input name="contactphone" type="text" value=""></td></tr> <tr><th>Country of residence</th></tr> <tr><td><input name="country" type="text" value=""></td></tr> <tr><th>Arrival date</th></tr> <tr><td><select name="arrivalday"> <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 <option value="521">21 <option value="22">22 <option value="23">23 <option value="24">24 <option value="25">25 <option value="26">26 <option value="27">27 <option value="28">28 <option value="29">29 <option value="30">30 <option value="31">31 </select> <select name="arrivalmonth"> <option value="Jan">Jan <option value="Feb">Feb <option value="Mar">Mar <option value="Apr">Apr <option value="May">May <option value="Jun">Jun <option value="Jul">Jul <option value="Aug">Aug <option value="Sep">Sep <option value="Oct">Oct <option value="Nov">Nov <option value="Dec">Dec </select> <select name="arrivalyear"> <option value="2008">2008 <option value="2009">2009 <option value="2010">2010 <option value="2011">2011 <option value="2012">2012 </select></td></tr> <tr><th>Departure date</th></tr> <tr><td><select name="departureday"> <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="5">5 <option value="6">6 <option value="7">7 <option value="8">8 <option value="9">9 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 <option value="521">21 <option value="22">22 <option value="23">23 <option value="24">24 <option value="25">25 <option value="26">26 <option value="27">27 <option value="28">28 <option value="29">29 <option value="30">30 <option value="31">31 </select> <select name="departuremonth"> <option value="Jan">Jan <option value="Feb">Feb <option value="Mar">Mar <option value="Apr">Apr <option value="May">May <option value="Jun">Jun <option value="Jul">Jul <option value="Aug">Aug <option value="Sep">Sep <option value="Oct">Oct <option value="Nov">Nov <option value="Dec">Dec </select> <select name="departureyear"> <option value="2008">2008 <option value="2009">2009 <option value="2010">2010 <option value="2011">2011 <option value="2012">2012 </select></td></tr> <tr><th>Areas you want to visit</th></tr> <tr><td><input name="areas" type="text" value=""></td></tr> <tr><th>Number of travelers</th></tr> <tr><td><input name="partysize" type="text" value=""></td></tr> <tr><th>Room type (single/double/twin/family)</th></tr> <tr><td><input name="roomtype" type="text" value=""></td></tr> <tr><th>Budget per day or indication of standard (i.e. 2,3,4,5 star)</th></tr> <tr><td><input name="budget" type="text" value=""></td></tr> <tr><th>Special interests</th></tr> <tr><td><input name="specialinterest" type="text" value=""></td></tr> <tr><th>Any additional info/comments/requests</th></tr> <tr><td><input name="otherinfo" type="text" value=""></td></tr> </table> <input type="submit" value="Submit" class="submit" /><input name="Reset" value="Reset" type="reset"> <input name="redirect" type="hidden" value="thanks.html"> <input name="emailaddress" type="hidden" value="luke@africabespoke.com,michaela@africabespoke.com,carola@africabespoke.com"></form> </div> <p><img src="../images/logowhitenew2.jpg" /></p> </div> <!-- * end inner content * --> </div> <!-- * end content * --><!-- * sidebar * --> <div id="sidebar"> <div id="teaser"> <h3>SOUTHERN AFRICAN SAFARI ADVENTURE</h3> <img src="../images/southern-african-safari.jpg" alt="Southern African Safari" width="162" height="98" class="picture" /> <h4>TRAVEL BOTSWANA</h4> <p><strong>Botswana</strong> is home to Southern Africa's last true wilderness areas, where wildlife roams free and migrates naturally with the seasons. <a href="../travel-destinations/southern-africa/botswana.html">Read more...</a></p> </div> <div id="enquiry"> <h3>Subscribe to our Newsletter</h3> <table> <tr><br /> <th>Name</th> </tr> <tr> <td><input type="text" name="name" /></td> </tr> <tr> <th>Email</th> </tr> <tr> <td><input type="text" name="email" /></td> </tr> </table> <input type="submit" value="Submit" class="submit" /> </div> </div><!-- * end sidebar * --> </div> <!-- * footer * --> <div id="footer"> <p><strong>Telephone:</strong> +27 (0)21 674 5820 <strong>Email:</strong> <a href="mailto:info@africabespoke.com">info@africabespoke.com</a></p> <p class="foot">Copyright © 2008 Africa Bespoke. All rights reserved. | <a href="../conditions.html">Conditions</a> | <a href="../contact.html">Contact</a> | <a href="../sitemap.html">Site Map</a></p> </div> <!-- * end footer * --><script type="text/javascript">var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script><script type="text/javascript">var pageTracker = _gat._getTracker("UA-4466838-1");pageTracker._initData();pageTracker._trackPageview();</script></div></body></html>
Link to comment
Share on other sites

The form is fine. So the problem is probably with your javascript. You should make sure you are passing the correct values to MM_validateForm(), and you should alert the value of document.MM_returnValue. It it returns false, or empty, something is wrong.Well, things are as I guessed. You do not have a script with references to MM_validateForm() and document.MM_returnValue. That is why your form doesn't work. Change your opening form tag to this:<form action="sendemail.php" method="POST" name="form1">I don't promise this will fix everything, but it will get you started.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...