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 trialKathryn Notson
25,941 PointsjQuery Basics: Creating a Password Confirmation Form - Perfect
I'm not seeing the 405 Not Allowed error message when I click on the Submit button. It doesn't matter if I use IE 11 or Google Chrome. I get a different dialog box.
6 Answers
Eric Roellig
9,150 PointsI had the same issue and it took me a moment to figure out the problem.. all after going through my code 5 times and even downloading the correct code and comparing side by side. my code was right..!!!.
It was actually working fine.. the page just isnt going to a 405 (for some reason something changed and this is no longer working like it does in the video) . HOWEVER the form did submit and go to the following URL
http://port-80-itcxe71hcq.treehouse-app.com/#
which is a new URL and different from
http://port-80-itcxe71hcq.treehouse-app.com/
if you pull up the console, you do see it does load a new page.. your form is probably working fine.. compare your results to mine and see if this is the same for you..
Kathryn Notson
25,941 PointsEric Roellig:
I think the issue is the instructor is using MacIntosh OSX & Safari or Google Chrome & I'm using Windows 7 Professional or Enterprise & IE 11 or Google Chrome. I've stared at my code multiple times, too, including copying & pasting it into Notepad & printing it to compare it with the video, syntax included. I have used the JavaScript console & I'm not seeing any errors as a result, either. I think it's just the browsers responding differently in their respective operating systems.
The videos are likely 1 1/2- 2yrs. old by the time Treehouse posts the course.
Eric Roellig
9,150 PointsKathryn, I am using a mac with google chrome. the page doesnt go to a 405 after clicking submit, it didnt at any point, not even when I downloaded their finished code and copied and replaced it onto the workspace, not even at the beginning .. check your url after you click the submit button.. if it has the # after the URL when you click submit then the form worked.. delete the # in the url hit return to reload the page and try it again.. if it once again loads a new page with #.. then it worked.
nicole grima
5,028 PointsThanks Eric :)
Kathryn Notson
25,941 PointsEric Roellig, Andrew Chalkley:
Thanks for that info. Strange to me that you would get a different result than the instructor who is using MacIntosh OSX & Google Chrome from the looks of his video. (I know that's what all the Treehouse instructors are using.) I even updated my jquery from 1.11.0 to 1.11.3 in my index.html file to see if it changed the response, & it doesn't. I get a different dialog box whether I use the 1.11.0 jquery script or the 1.11.3 jquery script in my index.html. Hmmm.
Eric Roellig
9,150 Pointskathryn... it doesn't have anything to do with your browser.. its in the code for the index page
<form action="#" method="post">
"action" is what tells your form what to do after you submit it.. action is shown to go to "#" you can replace that with a url to make it go elsewhere..
ie
<form action="http://www.google.com" method="post">
save that index page, reload your page in the browser, submit the form and you will go to google.com when you submit.. and it will probably have a 405 error because google doesnt know why you are posting to it..
Andrew Chalkley
Treehouse Guest TeacherHey Eric Roellig & Kathryn Notson,
I've just opened it up in Chrome and Safari and I don't get an error now. I think the reason is this...Workspaces started out as a static tool, in other words for front-end applications. Performing a POST on '#' wouldn't work. Workspaces has evolved over time to include dynamic applications (PHP, Ruby, Python and Node.js) and the way it's set up now may allow POST requests for static sites (like the one in jQuery Basics).
Sorry for any confusion!
Regards,
Andrew
Kathryn Notson
25,941 PointsAndrew Chalkley:
Thanks for the clarification.
Also, since your videos were created, jQuery has been updated twice, most currently since Friday, 1/8/16. I updated my index.html from jQuery 1.11.0 to 1.11.3, to see if that would affect the lesson, but now there's 1.12.0.
I'm getting dialog boxes in IE 11 & Google Chrome that behave like alert dialog boxes when I click on "Refresh" arrow.
Andrew Chalkley
Treehouse Guest TeacherWhat do they say?
Eric Roellig
9,150 PointsAndrew the form never gave an error as if it were broken.. in the video it shows that when you click on the submit button the page goes to a new page with a 405 . that is shown as the correct function of the form.. Which may have worked like that at some point. But now with whatever server changes you have had it doesnt do that.. so instead of the user being taken to a new page the page simply reloads the same exact form example, which makes you think that your code is broken because you didnt go anywhere upon click submit. You are expecting to see the 405 page but you just see your same form, and it does it quick enough that you dont notice.. it just appears that your code is broken because you are looking at the same form and not another page
someone should at least change the form action to something other than "#" so that the workspace functions as it does in the video (going to another page rather than reloading the current page).. no??
thanks.
Kathryn Notson
25,941 PointsAndrew Chalkley & Eric Roellig:
Here's what I got when I clicked on the "Submit" button & the "Refresh" circling arrow. I got 2 different alert dialog boxes as follows:
Note that Worksource Oregon & Multnomah County Library system use Microsoft Windows 7 Professional or Enterprise & IE 11, Google Chrome, or Mozilla Firefox (MCL system only). These are the desktop computer systems I'm using.
Microsoft Windows 7 Professional or Enterprise & IE 11: "(! inside triangle) To display the webpage again, the web browser needs to resend the information you've previously submitted. If you were making a purchase, you should click Cancel to avoid a duplicate transaction. Otherwise, click Retry to display the webpage again." It includes "Retry" & "Cancel" buttons inside the dialog box.
Microsoft Windows 7 Professional or Enterprise & Google Chrome: "(heading) Confirm Form Resubmission The page that you're looking for used information that you entered. Returning to that page might cause any action you took to be repeated. Do you want to continue?" It includes "Continue" & "Cancel" buttons inside the dialog box.
Sergey Podgornyy
20,660 PointsSergey Podgornyy
20,660 PointsNo one can help you if you don't post your code. Here is a reference on how to post your code - Posting Code to the Forum