mirror of
https://github.com/hexahigh/portfolio.git
synced 2025-12-12 03:25:06 +01:00
push
This commit is contained in:
parent
431accf4b3
commit
d1e0799d81
32
index.js
32
index.js
@ -43,4 +43,34 @@ 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/MUIEAHVHFKo30-l0E7GWm__Ik0lHwyITHmXyb-UlUlgD1PqMJAHk5jlFRp9cZ3HXLy2ZJNBL3ytPvMl5Mp8JrTbMgZnZqYYW4OXIzkk8QoL0OJIgUUdmiv98dF8bBDJGTDYsQormUfVvOCCkPusdemllOZytuSWnKnqdv1t16bJtsXQh3lYAIIWUXj7xdZixAMlS3mAIGgLaVCLr', { 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