Thank you jakecigar for your help!
I read some about new FormData() and learned a lot. This is the solution which work just fine
html:
onclick events in JS:
$( 'div#submitAddImage' ).on( 'click' , uploadImage );
and function in JS to be executed:
function uploadImage() {
var fileToUpload = new FormData();
fileToUpload.append( 'fileToSave' , $( '#imgInput' )[0].files[0] );
$.ajax({
url: 'changeUploadImage.php',
data: fileToUpload,
processData: false,
contentType: false,
type: 'POST',
success: function( data ){ alert( 'fertig' ); }
});
}
The corresponding php server-side function (simplified) looks like:
include 'scripts/init.php';
if ( $_SESSION['loggedIn'] ) {
$saveRefReturnValue = 'databaseUpdated';
} else {
$saveRefReturnValue = '!loggedIn';
}
echo $saveRefReturnValue;
?>
Hope that help somebody else out there...
Frank