0

http://pastebin.com/jqhiH3MR

This is form-1.html from Week 9 code walkthroughs. When professor runs this code in the video without giving any input, he gets an alert message and his url remains the same. When I try to do it, i get an error saying that register.php doesn't exist. So i made a blank register.php, and now when i try it, i get redirected to register.php (my url changes to : http ://localhost/register.php?email=&password=&confirmation= ). And i dont get any alerts at all.

What am i doing wrong?

1

There's a little typo in your script. You used doucument instead of document on line 20. It should be

var form = document.getElementById('registration');

This causes your JavaScript to output an error because there's no such variable named doucument. Therefore, you're not getting the expected results.

| improve this answer | |
  • And that boys is why you should not code at 3am. Thanks a lot Kareem. P.S. Can you take a look at my other questions too. I followed up some questions to which you had given replies almost 3 weeks late.. – Aditya Kashyap Aug 14 '14 at 21:12
  • @AdityaKashyap I'm so sorry I was really busy the past few days. Feel free to post a link to these other questions here or in the chat room. If you chose the chat room option, kindly mention me there! – Kareem Aug 14 '14 at 21:18
  • @AdityaKashyap again, syntax errors! If you right click in your Chrome and chose Inspect Element then opened the Console tab, you'd see that clearly. Anyhow, you forgot the closing parentheses for both of your anonymous functions. – Kareem Aug 15 '14 at 6:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .