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?

0

1 Answer 1

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.

3
  • 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.. Commented Aug 14, 2014 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!
    – kzidane
    Commented Aug 14, 2014 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.
    – kzidane
    Commented Aug 15, 2014 at 6:31

You must log in to answer this question.

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