jQuery - Ajax showing empty RESPONSE / Success: not triggered when used with WordPress posts and pages
===

Any help would be appreciated.

I have created a small script which works fine when used with simple php pages. Now I just tried to add this script to my WordPress posts and pages. So I used "exec-php" plugin to call the php script.

Everything works fine. But when user fills the data and submits the form, the data actually gets submitted (I can see the posted variables in firebug), but the response is not displayed under the form when used with wordpress, where as it works fine when used with plain php pages.

My jQuery code is like this:

    var dataString = 'name=' + name + '&country=' + country + '&lang=' + language;
    
    $("#paypal-submit").click(function () {
    
    	$.ajax({
    		type: "POST",
    		url: "get.php",
    		data: dataString,
    		dataType: 'html',
    		success: function (gotresponse) {
    			$('#response-id').html("<div id='id-message'><p>Got Response</p></div>");
    			$('#id-message').html(gotresponse).fadeIn(1500, function () {
    				$('#id-message');
    			});
                $('#name').attr('onchange', 'resetForm()');
                $('#country').attr('onchange', 'resetForm()');
    		}
    	});
    	return false;
    });

When I actually view the whole process in firebug, I can see that the data is actually posted to the server.

    200 OK               2.03s

**But when I see the response tab in firebug console, it is empty. I think the success message is not getting triggered when used with WordPress.**

I cant figure out what could be the problem? Can someone help me solve this?

*NOTE: The same script works fine when used as it is, but when used with WordPress the jQuery - Ajax success does not get triggered.*