Simply, it doesn't, because it assigns each parameter you pass on from your fnction call from left to right. Let's say you have this function, copied from you:
function someFunction(responseTxt, statusTxt, xhr){
if(statusTxt == "success")
alert("External content loaded successfully!");
if(statusTxt == "error")
alert("Error: " + xhr.status + ": " + xhr.statusText);
}
and you want to pass values for variables statusTxt: "success" and xhr: your_xhr when you call this function. If you called the function like this:
someFunction("success", your_xhr);
this means "success" will be assigned to the parameter responseTxt and your_xhr to statusTxt.
Normally, you could just set responseTxt to null and set the rest to what you want, for example:
someFunction(null, "success", your_xhr);
or use an object literal in your function definition. Here's an example:
function someFunction(options){
if(options.statusTxt == "success")
alert("External content loaded successfully!");
if(options.statusTxt == "error")
alert("Error: " + options.xhr.status + ": " + options.xhr.statusText);
}
and your function call would look like this:
someFunction({statusTxt: "success", xhr: your_xhr});
Of course you need to check if responseTxt is undefined in case you don't use it.
Hope this helped.
.load(), and it always passes all of them. You can ignore the ones you don't care about, though.