Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -977,10 +977,10 @@ <h3></h3>
<p class="desc">Use this to access a generic DAV-like REST API.</p>
<p data-for="save load">
<label><span>URL</span>
<input type="text" class="url" /></label>
<input type="url" class="url" id="url" /></label>
</p>
<p class="row" data-for="save load">
<button class="go"></button><button class="cancel">Cancel</button>
<button class="go" id="go" disabled></button><button class="cancel">Cancel</button>
</p>
</div>

Expand Down
16 changes: 16 additions & 0 deletions my-mind.js
Original file line number Diff line number Diff line change
Expand Up @@ -4583,3 +4583,19 @@ ${text}`);
}
init19();
})();


// javascript to disable the button if empty
var nameInput = document.getElementById("url");
var submitButton = document.getElementById("go");


function checkForm() {
if (nameInput.value.trim() !== "") {
submitButton.removeAttribute("disabled");
} else {
submitButton.setAttribute("disabled", "true");
}
}

nameInput.addEventListener("input", checkForm);