roScripts forum

Wordpress Script Generator
Easily write your own wordpress plugins!
www.wpsecrets.com

Learn Simple PHP
Learn PHP with these simple videos!
www.simplephp.com

PLR Poster
Post hundreds of articles to your wordpress blog(s) at a time!
www.softwarefactoryinc.com/blog-software


Go Back   roScripts forum > General > roScripts related discussions

roScripts related discussions If there's anything that you hate, love or wish seing please say it here.

Reply
 
Thread Tools Display Modes
Old 02-10-2008, 08:31 AM   #1 (permalink)
Neoszion
Junior Member
 
Join Date: Feb 2008
Posts: 11
Rep Power: 0 Neoszion is on a distinguished road
Default Ajax Contact form error in IE only!

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 &amp; 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
Neoszion is offline   Reply With Quote
Sponsored Ads   #1.5
Sponsored posting
 
 
Join Date: The beginning
Posts: lots
Sponsored by...

WM Media - Sell Your Website at above market prices!
Adbot is online  
Old 02-11-2008, 09:52 PM   #2 (permalink)
roScripts
Administrator
 
roScripts's Avatar
 
Join Date: May 2007
Location: Bucharest
Posts: 649
Rep Power: 10 roScripts is on a distinguished road
Default Re: Ajax Contact form error in IE only!

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.
roScripts is offline   Reply With Quote
Old 02-13-2008, 06:31 PM   #3 (permalink)
Neoszion
Junior Member
 
Join Date: Feb 2008
Posts: 11
Rep Power: 0 Neoszion is on a distinguished road
Default Re: Ajax Contact form error in IE only!

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
Neoszion is offline   Reply With Quote
Old 02-15-2008, 05:55 PM   #4 (permalink)
Neoszion
Junior Member
 
Join Date: Feb 2008
Posts: 11
Rep Power: 0 Neoszion is on a distinguished road
Default Re: Ajax Contact form error in IE only!

Bump..

Did you have any luck? I cannot figure it out?
Neoszion is offline   Reply With Quote
Old 02-15-2008, 10:04 PM   #5 (permalink)
roScripts
Administrator
 
roScripts's Avatar
 
Join Date: May 2007
Location: Bucharest
Posts: 649
Rep Power: 10 roScripts is on a distinguished road
Default Re: Ajax Contact form error in IE only!

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.
roScripts is offline   Reply With Quote
Old 02-16-2008, 12:17 AM   #6 (permalink)
Neoszion
Junior Member
 
Join Date: Feb 2008
Posts: 11
Rep Power: 0 Neoszion is on a distinguished road
Default Re: Ajax Contact form error in IE only!

Check out this link in IE:

www.badassbrits.com/test/

It gives errors when submitted.

Last edited by Neoszion : 02-16-2008 at 12:00 PM.
Neoszion is offline   Reply With Quote
Old 02-17-2008, 11:26 PM   #7 (permalink)
Neoszion
Junior Member
 
Join Date: Feb 2008
Posts: 11
Rep Power: 0 Neoszion is on a distinguished road
Default Re: Ajax Contact form error in IE only!

Did you have anyluck with this.. I cannot see any prob but still continue to get errors in IE6/7
Neoszion is offline   Reply With Quote
Old 02-23-2008, 02:13 PM   #8 (permalink)
Neoszion
Junior Member
 
Join Date: Feb 2008
Posts: 11
Rep Power: 0 Neoszion is on a distinguished road
Default Re: Ajax Contact form error in IE only!

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?
Neoszion is offline   Reply With Quote
Old 10-13-2008, 09:53 PM   #9 (permalink)
midmodesign
Junior Member
 
Join Date: Oct 2008
Posts: 6
Rep Power: 0 midmodesign is on a distinguished road
Default Re: Ajax Contact form error in IE only!

Quote:
Originally Posted by Neoszion View Post
I have one more question regarding this tut. How can I add captcha to it or Hijack prevention? is this simple to do?
I would recommend adding a honeypot, just add a new field, hide it with CSS, and if it is filled, simply kill the PHP process. Unfortunately you have to do this with PHP, because if you do it with JS, the bot won't load it. I have an example up on my post for my AJAX contact form here: http://midmodesign.com/news/coding/j...with-honeypot/

Hope that helps, sorry to bump an old topic, but seeing as this is a top result some users might find this helpful.
midmodesign is offline   Reply With Quote
Old 10-30-2008, 02:54 AM   #10 (permalink)
wowgolds989
Member
 
Join Date: Oct 2008
Posts: 54
Rep Power: 1 wowgolds989 is on a distinguished road
Default October 30, 2008

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!!!
wowgolds989 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

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



All times are GMT. The time now is 12:46 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.