This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:contact [2018/10/24 13:27] – typo admin | en:contact [2024/03/23 21:43] (current) – admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <WRAP tabs> | ||
+ | * [[en: | ||
+ | * [[de: | ||
+ | * [[zh: | ||
+ | </ | ||
+ | ====== Contact ====== | ||
+ | |||
+ | < | ||
+ | action mail gunnar.lindenblatt@daibola.biz | ||
+ | labels : | ||
+ | thanks " | ||
+ | |||
+ | fieldset | ||
+ | email email ^ | ||
+ | textbox | ||
+ | textbox | ||
+ | number | ||
+ | yesno callback | ||
+ | |||
+ | fieldset "Your message" | ||
+ | select subject "- - -|Book Order|ChinaBridge|DeHanCi.com|Product Internationalisation|Protect + Care|sedamo|Smart Learning Factory|Web Check|Others" | ||
+ | textbox "Your reference" | ||
+ | textbox "Our reference" | ||
+ | textarea " | ||
+ | |||
+ | fieldset "" | ||
+ | submit " | ||
+ | </ | ||
+ | |||
+ | <PHP> | ||
+ | echo ' | ||
+ | < | ||
+ | // Get the text field element | ||
+ | var formemail = document.querySelector(\' | ||
+ | var formfullname = document.querySelector(\' | ||
+ | var formstreetaddress = document.querySelector(\' | ||
+ | var formphone = document.querySelector(\' | ||
+ | |||
+ | let api_url = "/ | ||
+ | async function getData() { | ||
+ | // console.log(" | ||
+ | formfullname.value = " | ||
+ | var email_var = formemail.value; | ||
+ | // console.log(" | ||
+ | const response = await fetch(api_url + email_var); | ||
+ | const data = await response.json(); | ||
+ | // console.log(data); | ||
+ | const { status, message, sedamo, nameline1, nameline2, phone } = data; | ||
+ | if (status == " | ||
+ | formfullname.value = nameline1; | ||
+ | formstreetaddress.value = " | ||
+ | formphone.value = " | ||
+ | } | ||
+ | else { | ||
+ | formfullname.value = ""; | ||
+ | if (status == " | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | // Add event listener | ||
+ | formemail.addEventListener(\' | ||
+ | // event handling code: | ||
+ | getData(); | ||
+ | }); | ||
+ | </ | ||
+ | '; | ||
+ | |||
+ | </ |