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

Is this right?

When I type in my password and confirmation match the submit button becomes active but it does not redirect to a 405 page it just reloads the password page. Is that supposed to happen? Why isn't it directing to a 405 page? Here's a snapshot of my code. https://w.trhou.se/l8h0omjsdm (I added the username to this but the same thing still happens.)

Edit: When I debug using $("#submit") and then $("#submit").prop("disabled", true) they both show the same result which is <input type="submit" value="SUBMIT" id="submit" disabled="">. That's what its supposed to be but when Andrew did it the disabled did not show for just typing $("submit")

Lukas Smith
Lukas Smith
4,026 Points

can U paste the code ?

Sorry, I thought I had added the snapshot. I probably deleted it because I edited the post a couple of times.

1 Answer

Hi Marlinda,

Your form action is set to just action="#" so it won't actually perform any action other than reloading the page when submitted. Usually a form would direct to another server side page/script to handle the form data.