Why my AJAX contact us not working in google chrome

this is my website i develop http://alessandro.babonmultimedia.com/ when we clicked at contact (navigation at top), there will be contact us form loaded via jquery AJAX,

the question is:

Read More
  1. when we click submit, it will sending mail.

this is work in Firefox 3.6.1, but in google chrome 7.0.517.41 the submit button do nothing..

  1. why this can be happen?
  2. is there a way to make it work?
  3. what is the best method to implement AJAX JavaScript, when the selector we are targeting is loaded via javascript (i first use $(document).ready(), but this not work for content loaded via AJAX 🙁 )

Thx..

Related posts

Leave a Reply

1 comment

  1. Looking at my error log it seems you are still referencing console. If the console isn’t open then window.console is undefined and will halt execution.

    function contact_us(){
        /**************REMOVE*******************/
        console.log('AJAXnya start');
        /**************THIS*******************/
        $('#contactus form').fadeTo('slow', .2);
        $.ajax({
            type    : 'POST',
            url : '/wp-content/themes/second-edition/js/form-contactus.php',
            dataType    : 'json',
            data    : {
                name        : $('#contactus input[name="name"]').val(),
                surname : $('#contactus input[name="surname"]').val(),
                email   : $('#contactus input[name="email"]').val(),
                website : $('#contactus input[name="website"]').val(),
                message : $('#contactus textarea[name="message"]').val()
            },
            success : function(data){
                alert(data.msg);
                $('#contactus form').fadeTo('slow', 1);
            },
            error: function(XMLHttpRequest, textStatus, errorThrown){
                alert('There Was an Error, please contact Web Administrator');
            }
        });
    }