Can anyone look at this page and tell me what im doing wrong?
I have the form working in all browsers except IE6, and IE7!!!!

html head (just in case of js conflicts):

<script src="../js/script.js" type="text/javascript"
language="javascript"></script>
<script src="../js/SpryAssets/SpryTabbedPanels.js" type="text/
javascript"></script>
<script src="../js/SpryAssets/SpryCollapsiblePanel.js" type="text/
javascript"></script>
<script type="text/javascript" src="../js/jquery-1.3.2.js"></script>
<script type="text/javascript" src="../js/jquery.form.js"></script>
<script type="text/javascript">
$(function()
{
$("#contact_collapse_button").click(function(event) {
event.preventDefault();
$("#contact_collapse").slideToggle();
});

$("#contact_collapse a").click(function(event) {
event.preventDefault();
$("#contact_collapse").slideUp();
});
});

</script>

JS (jquery.form.js):

jQuery(function() {

        //if submit button is clicked
        $('#submit').click(function () {

                //Get the data from all the fields
                var name = $('input[name=name]');
                var email = $('input[name=email]');
                var phone = $('input[name=phone]');
                var timeframe = $('input[name=timeframe]');
                var emplcount = $('input[name=emplcount]');
                var coname = $('input[name=coname]');
                var coaddress = $('input[name=coaddress]');
                var cocitystatezip = $('input[name=cocitystatezip]');
                var comment = $('textarea[name=comment]');

                //Simple validation to make sure user entered something
                //If error found, add hightlight class to the text field
                if (name.val()=='') {
                        name.addClass('hightlight');
                        return false;
                } else name.removeClass('hightlight');

                if (email.val()=='') {
                        email.addClass('hightlight');
                        return false;
                } else email.removeClass('hightlight');

                if (phone.val()=='') {
                        phone.addClass('hightlight');
                        return false;
                } else phone.removeClass('hightlight');

                //organize the data properly
                var data = 'name=' + name.val() + '&email=' + email.val() +
'&phone='
                + phone.val() + '&timeframe=' + timeframe.val() + '&emplcount=' 
+
emplcount.val() + '&coname=' + coname.val() + '&coaddress=' +
coaddress.val() + '&cocitystatezip=' + cocitystatezip.val() +
'&comment='  + encodeURIComponent(comment.val()) ;


                //disabled all the text fields
                $('.text').attr('disabled','true');

                //show the loading sign
                $('.loading').show();

                //start the ajax
                $.ajax({
                        //this is the php file that processes the data and send 
mail
                        url: "../js/process.php",

                        //GET method is used
                        type: "GET",

                        //pass the data
                        data: data,

                        //Do not cache the page
                        cache: false,

                        //success
                        success: function (html) {
                                //if process.php returned 1/true (send mail 
success)
                                if (html==1) {
                                        //hide the form
                                        $('#form-rfq').fadeOut('slow');


                                        //show the success message
                                        $('.done').fadeIn('slow');

                                //if process.php returned 0/false (send mail 
failed)
                                } else alert('Sorry, unexpected error. Please 
try again
later.');
                        }
                });

                //cancel the submit button default behaviours
                return false;
        });
});

HTML of form:

<div class="done">
<div style="margin-top:130px;"><strong>Thank you ! We have received
your message. You may refresh this page if you wish to refill the form
again.</strong></div>
</div>
<div id="form-rfq">
<p>Request MRX-35 Quote</p>
<div class="block">

        <div class="form">
    <form method="post" action="../js/process.php">
        <div class="rfq_columns">
    <div class="element">
                <label>Your Name*</label><br />
                <input name="name" type="text" class="text" />
        </div>

        <div class="element">
                <label>Valid Email*</label><br />
                <input name="email" type="text" class="text" />
        </div>
        <div class="element">
                <label>Phone Number*</label><br />
                <input name="phone" type="text" class="text" />
        </div>
        <div class="element">
                <label>Purchase Time Frame</label><br />
                <input type="text" name="timeframe" class="text" />
        </div>

        <!--End RFQ Column--></div>

        <div class="rfq_columns">
    <div class="element">
                <label>Company Name</label><br />
                <input type="text" name="coname" class="text" />
        </div>
        <div class="element">
                <label>Company Address</label><br />
                <input type="text" name="coaddress" class="text" />
        </div>
        <div class="element">
                <label>City, State, Zip</label><br />
                <input type="text" name="cocitystatezip" class="text" />
        </div>
        <div class="element">
                <label># of Employees</label><br />
                <input type="text" name="emplcount" class="text" />
        </div>

        <!--End RFQ Column--></div>

        <div class="rfq_columns">

        <div class="element">
                <label>Additional Comments</label><br />
                <textarea name="comment" class="text textarea" /></textarea>
        </div>
        <div class="element">

                <input value="Submit Request"  type="submit" id="submit"/>
                <div class="loading"></div>
        </div>

    <!--End RFQ Column--></div>
        </form>
        </div>
</div>
<div class="clear"></div>

</div>
</div>

Let me know if you need css...


Page in question:

http://www.centraltimeclock.com/ctcbeta/timeandattendance/mrx35.php


Thanks Everyone!!

Reply via email to