AWS Contact Form tutorial not working

0

I am trying to get this simple tutorial working here,
https://aws.amazon.com/blogs/architecture/create-dynamic-contact-forms-for-s3-static-websites-using-aws-lambda-amazon-api-gateway-and-amazon-ses/

but I'm getting an Uncaught ReferenceError: $ is not defined error referring to the jQuery block around this part.

if (!Namere.test($("#name-input").val())) {

I did not add any other jQuery libs for the purpose of this exercise. Should I be doing so?

I got my email address verified....I have not yet verified my domain name, but I would think I'd get a different error here?

Any help or feedback would be appreciated.

Thanks!

已提问 5 年前260 查看次数
2 回答
0

Actually, I may have figured it out. I had to re-enable CORS on the API Gateway resource, but also I noticed mention on StackOverflow about the following:

https://stackoverflow.com/questions/2075337/uncaught-referenceerror-is-not-defined

Indicating it simply needed SOME jQuery lib reference - didn't matter what apparently. I added that and it seems to have worked and gone through!

已回答 5 年前
0

I think with the 2 links I added, I found the answer, AFAICT!

已回答 5 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则