Can not call .php files after switching to %postname%

What I assume is happening is when you are viewing a page with pretty permalinks, your relative URL breaks: submenu.php becomes http://yourdomain.com/pagename/submenu.php

Try using .ajax instead:

$.ajax({ 
    type: "GET",
    url: "http://localhost/submenu.php", 
    data: "cat=32" 
}).success(function(data) {
     $('#content').html(data);
});

This behavior wouldn’t happen using the standard URI query because no URI segments are added, therefore the browser would always know to look in the root. Using the ajax function is a much better solution than the load function.

tech