I've been scratching my head for hours trying to figure this out. But hours later,still no luck. So I've created a function but when I run the code it says im getting a Reference error and saying that the variable isnt declared

Here is my code:

<html>

<head>
<script src = "fileLoading.js"></script>
<script>

function initialLoad(boolean vraiFaux){
fileLoading("inventory.xml", vraiFaux); //boolean to variable
}

//function pageWrite(){
// code here
//}

</script>

</head>
<button type = "button" onClick = "initialLoad(true)">
<img src = "panda4.png" alt="Does this work?"></img>
</button>

<body id = "body" onload="initialLoad(false)">

</body>

</html>

If anyone can help I will gladly appreciate it