jQuery getJSON function

Hi,

I’m using this really very small script to fire a jSon request:


<script>
            $(document).ready(function(){

                $('#form_removeData').submit(function(){
                        var gid = $('.gidRem').val();
                        var m   = $('.m_ToRemove').val();
                        var url = "memberSearch/membersearch.jsp?user.Email=" + m + "&group.PK=" + gid;

                         $.getJSON(url, function(data) {
                            console.log('TRUE or FALSe');
                            if (data.isMember === 'false') {
                                return false;
                            }
                        });

                });
            });
</script>

It’s just driving me crazy and doesn’t give no respond… (no response in FireBug under FireFox). I can see the the passed parameters and the query string but
it just doesn’t work… no response in order to run the if statement regarding the user membership.

It showing an error in the jQuery file: http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js at line:5

But I can’t fix it or find the bug.

Any help Pls.?

Many thanks
Messmar

I think you can use normal ajax with response string and then use

var data = eval("(" + responseText + ")");

Hi Messmar, welcome to the forums,

I’m not even going to bother looking at the minified code.
If you use the non-minified version for development it will be a lot easier for you.
If you try this what do you see?

<script>
            $(document).ready(function(){

                $('#form_removeData').submit(function(){
                        var gid = $('.gidRem').val();
                        var m   = $('.m_ToRemove').val();
                        var url = "memberSearch/membersearch.jsp?user.Email=" + m + "&group.PK=" + gid;

                         $.getJSON(url, function(data) {
//                            console.log('TRUE or FALSe');
//                            if (data.isMember === 'false') {
//                                return false;
//                            }
// BEGIN TROUBLESHOOT
                        var data_info = "Data Object \\r\
";
			for (var prop in data) {
				data_info += prop + " = " + data[prop] + "\\r\
";
			}
			alert(data_info);	
// END TROUBLESHOOT
                        });
                
                });
            });
</script>