Assignment 5 Working portion of page but autograder not reading any of the properties

I need some guidance here. As you’ll see in my screenshots, the autograder is seeing an empty string instead of ‘hidden’ for the visibility property of faultyItems. It’s doing this for the pilot and co-pilot names as well. What’s strange is that this portion of the site works fine. Am I doing things in a way that they didn’t intend for them to be done? I’m currently updating those properties in the submit event listener.

I also didn’t understand what they meant in the instructions when they said " formSubmission() will take in a document parameter and strings representing the pilot, co-pilot, fuel level, and cargo mass. Using the values in those strings and the document parameter for your HTML document, update the shuttle requirements as described below."

What argument is intended to go into that document parameter? A reference to the HTML page? There’s also a “list” parameter for the formSubmission function. What’s the intended argument for that? I think this is likely the root of my problem, because I just skipped over that part for the time being.

Thanks for the help.

Hi @usernam, I just submitted my assignment and got the same first error message (Expected ‘’ to equal ‘hidden’). faultyItems starts out as ‘hidden’ in styles.css, i.e.

(#faultyItems {
visibility: hidden;
}

so I didn’t think we needed to specify that it should be hidden - and like you said, my page is operating exactly as it should without this.
I’m not sure how to resolve this yet but will let you know if I find any tricks.

I’m also confused about the document parameter in formSubmission(). I took it out as it kept coming up with “error: document is undefined” and that made it go away and made the page work. However, now I’m getting an error in the autograder that says “document is not defined” so I know I need to add it back in, but I’m confused about how to define it as I thought it was a global variable according to the readings?

I’m not sure if this is the right thing or what they were going for, but I just left the parameter in but used form = document.querySelecter(“form”); and put form in for the “document” argument. Autograder does not say that “document is not defined”.

I also thought that document was a global variable. If they’re going to force us to implement something in a specific way, I wish their instructions were written more clearly.

1 Like

Hey @usernam I’ve fixed the “Expected ‘’ to equal ‘hidden’” error (assuming yours is the same problem as mine) and all you have to do is set your list = ‘hidden’ at the start of your function. To me this seems repetitive because, with styles.css it’s already doing this, but it’s no harm to just add it in again as it makes it pass the autograder. Hope that helps.

Well, that didn’t work for me either. I really don’t know what’s going on with mine. But oh well. I’ll see what they grade it as. I assume I should be ok because it all works.

Thanks a lot for trying to help.

Actually, that did help me. I thought you meant the formSubmission funtion, but I added it at the beginning of my load event handler and it worked. Now I’m getting errors about alert not being defined, probably because I am using alert in the helpers file instead of exclusively in the script.js file. But I don’t know for sure.