dataType: "json" is not to specify the type of a file is to specify the kind of data that the server will return. From the server side, for example if you are using php, you have to return the json string using the function "json_encode" so it can be accepted by dataType: "json".