Skip to content Skip to sidebar Skip to footer

Ajax Not Being Called

I wrote a little form in HTML with three textboxes. The idea is to create a 'Contact me' form that is going to use the information submitted, by NodeMailer. However, my ajax functi

Solution 1:

Try a specific filename instead of a folder. ie;

url:"/time/index.html",

Include any errors from the Dev Console (F12 in Browser) to helps us help you.

Solution 2:

You are missing a couple of things here -

1) Add a contentType: "application/json" to the ajax options.

2) Stringify your JSON:

data:JSON.stringify({name:name,email:email,message:message}),

Also, just double check if parameters of your /time method are name, email and message respectively.

Post a Comment for "Ajax Not Being Called"