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

Uncaught ReferenceError: $tShirtDesignDropdown is not defined at app.js:34

please see link of snapshot for your reference: https://w.trhou.se/ux0lm3fp49

any hints, suggestions and comments are very much appreciated thank you in advance for your help.

1 Answer

Hi Karl,

You see how in lines 7 and 8 of app.js you have the two following statements:

app.js
var jobItem = document.querySelector('#title');
var fieldset = document.querySelector('fieldset');

Those two statements declare the variables jobItem and fieldset and assign elements to them.

You never do that for the variable $tShirtDesignDropdown, so when you try to call the change method on $tShirtDesignDropdown on line app.js:34, the JavaScript interpreter is like, "What is $tShirtDesignDropdown? It's not a value, it's not anything right now. And because it's not anything, it doesn't have a change method to execute." The app crashes at that point and sends you the error message you're receiving.

So at some point in your code before you reach line app.js:34, you need to declare and assign a value to $tShirtDesignDropdown.

thank you for your response ill try to fix it. Brandon White