Error with Codepen

Error with Codepen
0.0 0

#1

Help, help…
I’ve just got this after clicking a submit button on my form in Codepen: http://codepen.io/tk10kinhkinh/pen/wdQJyW?editors=0010


#2

Remove the method="POST" and action="". This way nothing will be sent. The page will still refresh, though. You can overwrite that, by adding e.preventDefault() to your event handler:

$("#search").on("click", function(e){
  e.preventDefault();
  ------
});

#3

Thank you so much ^^


#4

But could you help me a little bit more?
When I click the submit button, it takes no action T.T


#5

You will have to add e.preventDefault(). It currently refreshes the page when you submit the form. When the page refreshes, there is no way for the browser to know that you expected it too make an AJAX call.


#6

OMG, it works =))))
Thank you, thank you so muchhhhhhhh