Hello, i am working on PHP and jQuery trying to do a post with jquery. It seems to work in FF but IE is giving me several error:

The follwing is the code i am using:

<script>
$(function()
{
    $("#mainForm").submit(function()
    {
        dataString = $("#mainForm").serialize();

        $.ajax({
                type        : "POST",
                url         : "/gops/views/groups//ajax.php",
                data        : dataString,
                //dataType  : "json",
                success     : function(data) {                  
                                gid = $("#group_id").val();
                                $('#load_skills').load('/gops/views/groups/get_skills.php?gid='+gid);
                                } 
        }); 
        return false;  

    });///close submit
});//close function
</script>

These are the errors i am getting in IE8:
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; BRI/2; InfoPath.2)
Timestamp: Thu, 19 Jul 2012 14:11:45 UTC

Message: Object doesn't support this property or method
Line: 3
Char: 13
Code: 0

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; BRI/2; InfoPath.2)
Timestamp: Thu, 19 Jul 2012 14:12:04 UTC

Message: Object doesn't support this property or method
Line: 3
Char: 13
Code: 0
URI:

Message: Object doesn't support this property or method
Line: 2
Char: 9
Code: 0
URI:

Message: Could not complete the operation due to error 80020101.
Line: 2
Char: 11321
Code: 0
URI: http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js?_=1342707101099

"/gops/views/groups//ajax.php",

Is the double slash a typo ?

Hi
Try add type="texr/javascript" in <script>.
And, replace:

$(function()
{
// ...
});

With:

function fAjax() {
// ...
}
fAjax();
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.