Hi,

Have a strange case where I try to make a GET request using jQuery.

$.ajax({
        type: 'GET',
        url: 'MyMethod?param=ABC.ABC',
        timeout: 10000,
        contentType: 'application/x-www-form-urlencoded; charset=UTF-8',        
        success: function (data) {
        },
        error: function (xhr, status, error) {        
        }
    });

The method above works fine. But if I change the URL to

'MyMethod?param=ABC.jpg',

it's not working, the method (MyMethod) never gets called. Could anyone explain this?

I'm using jQuery 1.9.1

Member Avatar for diafol

I can't see how you can tell if it gets called or not from that code.

If you have this:

success: function (data) {
    alert(data);
},

Where is the MyMethod script?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.