|
|
| |||||||
| roScripts related discussions If there's anything that you hate, love or wish seing please say it here. |
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Junior Member Join Date: Feb 2008
Posts: 11
Rep Power: 0 ![]() | Hi there, I done the tutorial regarding the ajax contact form but I am getting this error in IE (btw I am a real newbie at php )..Javascript error "object doesn't support this property or method" Php error Notice: Undefined index: tbxName in /homepages/2/d224707754/htdocs/badassbrits.com/joinus/send.php on line 8 Here is the code if anyone could help I would be more than greatfull.. PHP error_reporting(E_NOTICE); function valid_email($str) { return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str)) ? FALSE : TRUE; } if($_POST['tbxName']!='' && valid_email($_POST['e_mail'])==TRUE && $_POST['games_played']!='' && $_POST['level']!='' && $_POST['county']!='' && $_POST['day']!='' && $_POST['month']!='' && $_POST['year']!='' && strlen($_POST['message'])>30) { $to = '*** Remove ***'; $headers = 'From: '.$_POST['e_mail'].''. "\r\n" . 'Reply-To: '.$_POST['e_mail'].'' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); $subject = "Bad Ass Brits Join Application!"; $message = htmlspecialchars // In game username Message sent ('In Game username(s): '.$_POST['tbxName'])."\r\n". // Email address Message sent ('Email Address: '.$_POST['e_mail'])."\r\n". // Games played Message sent ('Game(s) Played: '.$_POST['games_played'])."\r\n". // Game Level Message sent ('Gaming Level: '.$_POST['level'])."\r\n". // Email address Message sent ('Location: '.$_POST['county'])."\r\n". // DOB Message sent ('Date of Birth: '.$_POST['day']."/" .$_POST['month']. "/".$_POST['year'])."\r\n". ('Why Join?: '.$_POST['message']); if(mail($to, $subject, $message, $headers)) {//we show the good guy only in one case and the bad one for the rest. echo '<div style=" padding:10px;"> <img src="../images/success.gif" align="left" style=" padding:10px;"/> Thank you <strong>'.$_POST['tbxName'].'</strong>. Your application was sent to our Founder & Leaders. You will recieve an email shortly with all the info required for your next step into becoming a Bad Ass Brit. <br />Goodluck!</div>'; } else { echo "Message not sent. Please make sure you're not running this on localhost and also that you are allowed to run mail() function from your webserver"; } } else { echo '<div style=" padding:10px;"> <img src="../images/fail.gif" align="left" style=" padding:10px;"/> Please make sure you filed out all required fields and you agree to our rules & requirements.<br /> "Why Join us?" must have more than 30 charecters.'; } Parsed in 0.138 seconds HTML4STRICT window.addEvent('domready', function(){ $('joinform').addEvent('submit', function(e) { new Event(e).stop(); var log = $('log_res').empty().addClass('ajax-loading'); this.send({ update: log, onComplete: function() { log.removeClass('ajax-loading'); } }); }); }); Parsed in 0.004 seconds |
| | |
| Sponsored Ads | #1.5 |
| Sponsored posting Join Date: The beginning
Posts: lots
| Sponsored by... WM Media - Sell Your Website at above market prices!
|
| |
| | #2 (permalink) |
| Administrator Join Date: May 2007 Location: Bucharest
Posts: 649
Rep Power: 10 ![]() | Can you post the html code of your form?
__________________ Give a man a fish and you feed him for a day. Teach him how to fish and you feed him for a lifetime. |
| | |
| | #3 (permalink) |
| Junior Member Join Date: Feb 2008
Posts: 11
Rep Power: 0 ![]() | Sorry I forgot that part ![]() HTML4STRICT <form id="joinform" action="send.php" method="get" name="joinform"> <div id="form_box"> <div> <p> In game username(s) <span class="required">*</span> </p><input type="text" name="tbxName" value="" /> </div> <div> <p> E-Mail <span class="required">*</span> </p><input type="text" name="e_mail" value="" /> </div> <div> <p> Game(s) played <span class="required">*</span> </p><select name="games_played"> <option value="">- Select Game(s) -</option> <option value="Americas Army">America's Army</option> <option value="Call of Duty 4">Call of Duty 4</option> <option value="Both Games">Both</option> </select> </div> <div> <p> Gaming level <span class="required">*</span> </p><select name="level"> <option value="">- Select -</option> <option value="Noob">Noob</option> <option value="Average">Average</option> <option value="Above Average">Above Average</option> <option value="Good">Good</option> <option value="Very Good">Very Good</option> <option value="Pro">Pro</option> </select> </div> <div> <p> Location <span class="required">*</span> </p><select name="county" > <option value="">- Select a County -</option> <option>Other</option> <option>Aberdeenshire</option> </select> </div> <div> <p> Date of birth <span class="required">*</span> </p> <select name="day" style="width:80px;"> <option value="">- Day -</option> </select> <select name="month" style="width:80px;"> <option value="">- Month -</option> </select> <input type="text" name="year" onfocus="if(this.value=='Year') this.value='';" onblur="if(this.value=='') this.value='Year';" value="Year" style="width:50px;"/> </div> <div> <p> Why join us? <span class="required">*</span><br /> <em style="font-size:8pt; color:#8c8c8c;">minimum of 30 charecters</em> </p><textarea name="message" cols="42" rows="8"></textarea> </div> <div style=" text-align:center; background:none; border:none;"> I Agree to the <a href="http://www.badassbrits.com/#info-fx" target="_blank" style="font-weight:bold; color:#3A8DA5;">Rules/Requirements</a> <span class="required">*</span> <input style="width:18px; margin:0px; padding:0px;" name="agree" type="checkbox" value="" /> </div> </div> <input name="button" id="submit" type="image" src="../images/submit_btn.jpg" /> <br /> </form> Parsed in 0.283 seconds |
| | |
| | #5 (permalink) |
| Administrator Join Date: May 2007 Location: Bucharest
Posts: 649
Rep Power: 10 ![]() | Everything seems in order. I was curious if there's an input "tbxName" but I c it's there.
__________________ Give a man a fish and you feed him for a day. Teach him how to fish and you feed him for a lifetime. |
| | |
| | #8 (permalink) |
| Junior Member Join Date: Feb 2008
Posts: 11
Rep Power: 0 ![]() | I got it working it seemed to be a conflict with other js files.. I have one more question regarding this tut. How can I add captcha to it or Hijack prevention? is this simple to do? |
| | |
| | #9 (permalink) | |
| Junior Member Join Date: Oct 2008
Posts: 6
Rep Power: 0 ![]() | Quote:
Hope that helps, sorry to bump an old topic, but seeing as this is a top result some users might find this helpful. | |
| | |
| | #10 (permalink) |
| Member Join Date: Oct 2008
Posts: 54
Rep Power: 1 ![]() | Octobe 30, 2008 - MMOinn research centre has just developed the world's buy wow gold which can significantly increase the future output of wow gold . "It is real, the new hybrid gold will give us around 40 billion more gold every week," said an expert. The hybrid gold rice may end up replacing all the Wow power leveling in a few months. A new revolution will sweep over the gold farming industry and bring us the ultimate abundance of Cheap wow gold .
__________________ get cheap wow gold here right now!!! |
| | |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| AJAX Contact Form do this on ERROR and that on SUCCESS | Doc | roScripts related discussions | 10 | 12-12-2008 03:35 AM |
| Hi, Contact Form AJAX issue. | Zipline | Ajax | 2 | 01-15-2008 05:46 PM |
| AJAX Contact Form UTF-8 (multilingual) | urbanomad | roScripts related discussions | 3 | 12-21-2007 12:54 AM |
| Ajax form validation | kwalker | Programming | 3 | 11-16-2007 09:42 PM |
| ajax validation form | rossco | roScripts related discussions | 4 | 10-25-2007 06:10 AM |