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>
|
||||
|
||||
const linkInputName = "link";
|
||||
modal.innerHTML = `
|
||||
<div class="ui-dialog-titlebar ui-widget-header ui-helper-clearfix ui-draggable-handle">
|
||||
<span id="ui-id-1" class="ui-dialog-title">
|
||||
|
|
@ -7891,7 +7891,8 @@ function fantasyMap() {
|
|||
<div>Enter link to your map</div>
|
||||
<input
|
||||
style="width: 24em; margin-top: 0.5em"
|
||||
type="url"
|
||||
type="url"
|
||||
name="${linkInputName}"
|
||||
pattern=".*\\.map"
|
||||
placeholder="https://example.com/faerun.map"
|
||||
required
|
||||
|
|
@ -7907,7 +7908,8 @@ function fantasyMap() {
|
|||
|
||||
modal.onsubmit = (event) => {
|
||||
event.preventDefault();
|
||||
console.log("ok", event)
|
||||
const formData = new FormData(event.target);
|
||||
console.log("ok", formData.get(linkInputName), event)
|
||||
document.body.removeChild(modal);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue