mirror of
https://github.com/hexahigh/portfolio.git
synced 2025-12-12 03:25:06 +01:00
YAY
This commit is contained in:
parent
bfdfab90b0
commit
b12e7b4145
29
data/js/contact.js
Normal file
29
data/js/contact.js
Normal file
@ -0,0 +1,29 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const form = document.querySelector('#formid')
|
||||
const addButton = document.querySelector('#submitbutton')
|
||||
//const updateButton = document.querySelector('#updateAddress')
|
||||
|
||||
addButton && addButton.addEventListener('click', (e) => {
|
||||
e.preventDefault()
|
||||
|
||||
if (!form.checkValidity()) {
|
||||
return
|
||||
}
|
||||
|
||||
fetch('https://22242122.sibforms.com/serve/MUIEAFviVKMOgXKqIKahcIUcPU4E2qrOD5RoywBglC-uPPsZ1pivAjzG8KDv2COk2wTywJIcOMSA582duFkm5WlVF-LXT-CeloWSFr1zbi2uTI2kSd7HEO0QHHeYoD5AaUdCK1z5msZU8QGtV4UvacSmww2AM1sYE94g9IDNjjehiMdizx82c4WuXJAeN3LJH81P4lFZK1Qms5bI', { method: 'POST', body: new FormData(form) })
|
||||
.then((r => r.json()))
|
||||
.then(console.log)
|
||||
})
|
||||
|
||||
/*updateButton && updateButton.addEventListener('click', (e) => {
|
||||
e.preventDefault()
|
||||
|
||||
if (!form.checkValidity()) {
|
||||
return
|
||||
}
|
||||
|
||||
fetch('/updateAddress', { method: 'POST', body: new FormData(form) })
|
||||
.then((r => r.json()))
|
||||
.then(console.log)
|
||||
})*/
|
||||
})
|
||||
@ -33,6 +33,7 @@
|
||||
<link rel="stylesheet" href="data/style/offline-theme-dark.css">
|
||||
<link rel="stylesheet" href="data/style/offline-language-english.css">
|
||||
<script src="index.js" defer></script>
|
||||
<script src="/data/js/contact.js"></script>
|
||||
<script src="index-allpage.js" defer></script>
|
||||
<script src="https://hexahigh.github.io/cdn/js/min/offline.min.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
||||
|
||||
32
index.js
32
index.js
@ -43,34 +43,4 @@ window.onload = function blockform() {
|
||||
isblocked = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const form = document.querySelector('#formid')
|
||||
const addButton = document.querySelector('#submitbutton')
|
||||
//const updateButton = document.querySelector('#updateAddress')
|
||||
|
||||
addButton && addButton.addEventListener('click', (e) => {
|
||||
e.preventDefault()
|
||||
|
||||
if (!form.checkValidity()) {
|
||||
return
|
||||
}
|
||||
|
||||
fetch('https://22242122.sibforms.com/serve/MUIEAFviVKMOgXKqIKahcIUcPU4E2qrOD5RoywBglC-uPPsZ1pivAjzG8KDv2COk2wTywJIcOMSA582duFkm5WlVF-LXT-CeloWSFr1zbi2uTI2kSd7HEO0QHHeYoD5AaUdCK1z5msZU8QGtV4UvacSmww2AM1sYE94g9IDNjjehiMdizx82c4WuXJAeN3LJH81P4lFZK1Qms5bI', { method: 'POST', body: new FormData(form) })
|
||||
.then((r => r.json()))
|
||||
.then(console.log)
|
||||
})
|
||||
|
||||
/*updateButton && updateButton.addEventListener('click', (e) => {
|
||||
e.preventDefault()
|
||||
|
||||
if (!form.checkValidity()) {
|
||||
return
|
||||
}
|
||||
|
||||
fetch('/updateAddress', { method: 'POST', body: new FormData(form) })
|
||||
.then((r => r.json()))
|
||||
.then(console.log)
|
||||
})*/
|
||||
})
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user