Append to body


When enter is pressed, the page disappears? Why is that?

Replace this line with your code.


It has to do with the lesson interface being in an iframe. The Enter key is bound to the main document, not the embedded one. Solution,.. Don't use the Enter key to submit.

There is a bit of code that will prevent this from happening, but it is not part of the lesson or exercise.

    $("input").keypress(function (evt) {
        var charCode = evt.charCode || evt.keyCode;
        if (charCode  == 13) {
          return false;


I felt like I was never going to understand JavaScript, but jQuery, Eloquent JavaScript, you, and Stetim have made it 10 times easier. There are a lot of us on here that appreciate your help.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.