Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Treehouse Club: JavaScript Car Sounds Editing Your HTML

marcus Anum
PLUS
marcus Anum
Courses Plus Student 1,984 Points

'looks like task one is no longer passing'

getting the 'looks like task one is no longer passing' error when i try to change 'bike' to 'bikelock', what am i doing wrong?

index.html
<!DOCTYPE html>
<html lang="en">

  <head>
  <meta name="charset" value="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.5, maximum-scale=0.5, minimal-ui">
    <title>Car Sounds</title>

    <!--Style Sheet link-->
    <link rel="stylesheet" type="text/css" href="css/style.css">
  </head>

  <body>

    <!--Car image -->
    <img src="images/bike.png" class="car" alt="car">


    <!--Button-->
    <a href="javascript:startCar();"><img src="images/key.png" alt="key"></a>


    <!--Audio Files-->
    <audio id="startCar" src="sounds/startCarA.mp3" preload="auto"></audio>


    <!--Javascript-->
    <script type="text/javascript">
        function startCar() {
            document.getElementById('startCar').play();
        }

    </script>

  </body>

</html>

3 Answers

Tawny Bartlett
Tawny Bartlett
24,674 Points

Are you trying to change the button, not the original image? Line 20? :)

    <a href="javascript:startCar();"><img src="images/bikeLock.png" alt="key"></a>
marcus Anum
marcus Anum
Courses Plus Student 1,984 Points

Thanks, thats what i was trying to do, but even then when i change it, i get it wrong and it asks me to change line 16 to 'bikelock' well,<img src="images/bike.png" class="car" alt="car">, after which it tells me again that 'task one is not passing'

Tawny Bartlett
Tawny Bartlett
24,674 Points

Darn... maybe try it from the beginning just in case you've changed code somewhere by accident?! I hope you managed to figure this out :)

Steven Parker
Steven Parker
229,657 Points

I didn't see "bikeLock" anywhere on your code above, so I'm not sure where you were trying to put it.

But the place you should put it is on this line (line 20):

    <!--Button-->
    <a href="javascript:startCar();"><img src="images/key.png" alt="key"></a>

Line 16 was changed in task 1, and should stay that way for task 2.

Hi, I looked at the challenge (attached to this question), it states to use "bike.png". If you could kindly show us the pertinent challenge, it would help. Thanks so much.

marcus Anum
marcus Anum
Courses Plus Student 1,984 Points

Figured it out now, thanks. i was changing the wrong word in that line of code.