I'm stuck in choreDoor, please help!

I’ve been going trough this code too many times now and simply can’t find the place I’ve made a mistake…

Can someone help me: https://codepen.io/Sillas/pen/xvVKjj

1 Like

The variables on your listeners should be, doorImage1, …

You’ve declared OpenDoor1, … when they should be, openDoor1, …

I can’t spot anything else just now, but it could be heat. We’re boiling right now and I just got back from a twenty minute walk with the dog, so extra hot. Will take another look when I cool down.

Thank you very much!

I’m not quite sure what you mean by “The variables on your listeners should be, doorImage1” ?
I’ve corrected the “OpenDoor1” now.

Haha I fully understand that, hope you cool down soon.

2 Likes

Your code has door1.onclick = ... should be, doorImage1.onclick = ....

Thanks! But the doors are still not opening, do you have any idea what the reason could be?

If you can access the javascript console, clear the contents then click on a door. Is there any error reported?

On the off chance you cannot access the console. create a local version of the code and run it in your browser, then open the console and check for messages.

Can you please post a link to the actual exercise? Thanks.

For some reason it won’t let me share the path, it seems like a bug from Codecademy’s side.

But I’m now able to open the doors again, but it’s still not acting like it should…

You should be able to copy the URL in the location bar and paste it in a reply.

Try to complete the project in learning environment.

It just keeps loading when i try to copy it… That is why I copied it to codepen.

I do still do the development in the learning environment.

Not sure I understand, ‘keeps loading.’ You should be able to click in the location bar which will hilite (select) the URL which we can then copy. It would be nice to have that URL so I can look at my own code for comparison.

Ultimately, you cannot be that far off, and it’s something neither of us is seeing, right now. I’ll copy your code and do local setup and inspect.


I’ve got as far as having your code up and running on my machine. Doors don’t work, and there are no errors showing in the console. This is where I’ll be able to dig in and find the miscreant that’s ghosting the machine.

I’ve created an images folder and downloaded all the images so the CC CDN isn’t being accessed from my machine. I’m testing in Chrome, just now because I prefer its console.

The image paths are now,

./images/logo.svg
./images/star.svg

and so on.

BTW, your codepen is working, now. Did you find the culprit, or was it the repairs that did the trick?