Assignment 5 "Shuttle Requirements" section

Hi guys, Assignment #5 has been the toughest for me so far. I know a lot of you have probably submitted this already so you might have moved on from this - but I’m stuck and would really appreciate an outside look and some advice if you have a moment!

I got the first section “Adding Alerts” to work, but now I’ve been stuck on “Shuttle Requirements”.

See my screen shot of formSubmission() with my comment about the “shuttle requirements” block of code. Is this block of code supposed to part of the form.addEventListener(“submit”, function(event) {} function where the alerts are? Is it supposed to come directly after it? Or be in its own event listener?

I’ve tried all of these scenarios with minor progress, but now I can’t get the code to execute the way it should and I’m completely overwhelmed as to where it should go. I know I’m probably missing something very obvious, so if anyone could point me in the right direction, I would be so grateful.

I had some trouble with this and am still working on assignment 5 as well so you are not alone. The formSubmission function goes in an else statement after the alerts in the eventlistener. good luck.

I’m still not past the validateInput and formSubmission parts, so I cannot help you, but you are definitely not alone! A friend of mine who completed LC101 said Rover was the most difficult assignment, but I’m having a way harder time with this one! Maybe this one is easier to complete in the in-person class…

I haven’t finished yet either. Still trying to pass atuo grader.

I have not finished as well. My website does not even update at the moment and tells me my directory does not exist so you’re definitely not alone. Most of your code looks correct to me, the bottom portion of formSubmit is something I have not done yet and not really sure how to execute it properly. Still trying to fix my files so my website can update.

You might need to use parseInt to change the input string to a number. I don’t think the code is executing because of the datatype.

Thanks @N8ofBase - putting it in the else statement as part of the eventListener definitely makes the most sense. I’ve put it there, and while the alerts section is still working, now when it submits, nothing else happens to the “Awaiting Information Before Launch”. I’ll keep working with it.

@haterofblippi I totally agree!!

Thanks @miclamb241, that’s really interesting and definitely in line with what Terence seems to be suggesting in his help videos.

I’ve been trying to re-work validateInput() which I thought was working before - but now I think I need to change it to work with the rest of the code block that comes second.

So far the below only ever executes the first line of code??

function validateInput(testInput) {
if (typeof parseInt(testInput) === ‘number’) {
return “Is a Number”;
} else if (isNaN(parseInt(testInput)) === true) {
return “Not a Number”;
} else if (testInput === “”) {
return “Empty”;
}
}

I didn’t need to parse mine.
I added my event listener and code to check my validation into the script.js. I know others were able to do it in helper but mine wouldn’t call properly there.

I was able to finally get the green check so I guess you can do that portion either way but depends on how you call it.

I also can’t seem to get past that part.

OK I’ve finally gotten all of the formSubmission() function working. I didn’t use parseInt() in the end. If anyone has any questions from this stage, I can try to help.

me too have same issue.it still showing “Awaiting Information Before Launch”.how did u solve dis?

Hi @sabhi, can you explain more about what code you currently have? There could be lots of reasons why “Awaiting Information Before Launch” doesn’t change.

I still haven’t been able to succesfully submit this assignment unfortunately as I’m still having issues with the autograder and the 4 DOM manipulation tests. My webpage updates, but the autograder says that it still says ‘Awaiting Information Before Launch’, so I might not be the best person to answer your question anyway.