Javascript code - missing tag ?

Hi all,

I've got a missing brace or bracket in this code but cannot see it.

Can anyone help please?

Here is the code:

<script type="text/javascript">
function submitdata() {
$("#ajax-form").submit(function(){$.post("submit.php",$("#ajax-form").serialize(),
            
			function(data){
			   $('#jqm').attr('src', $('#jqm').attr('src'));
              
            }
        );
        return false;
    };
</script>

Open in new window


Thanks
error77Asked:
Who is Participating?
 
leakim971PluritechnicianCommented:
Check on this page : http://jsfiddle.net/xbYyB/

(place your cursor near the bracket and parentheses)
function submitdata() {
    $("#ajax-form").submit(function(){
        $.post("submit.php",$("#ajax-form").serialize(),
            function(data){
                $('#jqm').attr('src', $('#jqm').attr('src'));
            }
        );
        return false;
    });
}

Open in new window

0
 
rushtoshankarSr Manager Software DevelopmentCommented:
You have 3 open '{' - One near submitdata, submit(function(){ and the last one in function(data){

but only have two close

          }
        );  --> you might have seen this as ' } '
        return false;
    };
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.