mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 03:51:23 +01:00
Get FormData
This commit is contained in:
parent
eb8e715bb5
commit
effe39015c
1 changed files with 5 additions and 3 deletions
|
|
@ -7871,7 +7871,7 @@ function fantasyMap() {
|
||||||
// </div>
|
// </div>
|
||||||
// </div>
|
// </div>
|
||||||
// </div>
|
// </div>
|
||||||
|
const linkInputName = "link";
|
||||||
modal.innerHTML = `
|
modal.innerHTML = `
|
||||||
<div class="ui-dialog-titlebar ui-widget-header ui-helper-clearfix ui-draggable-handle">
|
<div class="ui-dialog-titlebar ui-widget-header ui-helper-clearfix ui-draggable-handle">
|
||||||
<span id="ui-id-1" class="ui-dialog-title">
|
<span id="ui-id-1" class="ui-dialog-title">
|
||||||
|
|
@ -7891,7 +7891,8 @@ function fantasyMap() {
|
||||||
<div>Enter link to your map</div>
|
<div>Enter link to your map</div>
|
||||||
<input
|
<input
|
||||||
style="width: 24em; margin-top: 0.5em"
|
style="width: 24em; margin-top: 0.5em"
|
||||||
type="url"
|
type="url"
|
||||||
|
name="${linkInputName}"
|
||||||
pattern=".*\\.map"
|
pattern=".*\\.map"
|
||||||
placeholder="https://example.com/faerun.map"
|
placeholder="https://example.com/faerun.map"
|
||||||
required
|
required
|
||||||
|
|
@ -7907,7 +7908,8 @@ function fantasyMap() {
|
||||||
|
|
||||||
modal.onsubmit = (event) => {
|
modal.onsubmit = (event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
console.log("ok", event)
|
const formData = new FormData(event.target);
|
||||||
|
console.log("ok", formData.get(linkInputName), event)
|
||||||
document.body.removeChild(modal);
|
document.body.removeChild(modal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue