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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南