I would like to know if possible how could I make an ajax call with this.

This would be a function in a .js file
function Transactions()
		type: "POST",
		url: "/php/query/transactions.php",
		dataType: "json",
		data: ({}),
		success: "",
		error: ""
in my "something.php" file how would I go about calling that function. Here is an example to give you an idea of what I'm trying to do.

PHP Code:
include 'something.js';

if (isset(
$_POST['submit'])) {

If this was a function from a .php I would instantiate the class then call the function but how would I be able to do that with a javascript function? Also, is that correct for me to include the .js file?