WordPress Ajax Not Working ( Custom Admin page)

Uncaught TypeError: Cannot read property ‘ajax’ of undefined

@Sasa1234, it happen cause your jQuery is undefined. Please take a look @EAMann answer. So, your JS code should like this:

function myajaxfunction() {
    if ( undefined !== window.jQuery ) {
        jQuery.ajax({ //ajax request
            url: ajaxurl,
            data: {
                'action':'rs_like_request',
                'post_type' : jQuery('#post_type').val() // value of text box having id "post_type"

            },
            success:function(data) {  //result
             jQuery(".showdiv").html(data); //showdiv is the class of the div where we want to show the results
            },
            error: function(errorThrown){
                console.log(errorThrown);
            }
        });  
    }
}