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:


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

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

//function pageWrite(){
// code here


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

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



If anyone can help I will gladly appreciate it