changes
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<form id="editor">
|
||||
<form id="editor" method="POST" action="/updateoffered2">
|
||||
<div id="server-response">Server Ready</div>
|
||||
Tickets owned by <%=username%>
|
||||
<table border="1">
|
||||
@@ -25,13 +25,14 @@
|
||||
<% for (const t in tickets) { %>
|
||||
<tr>
|
||||
<td><%=t%></td>
|
||||
<td><input type="edit" value="<%=tickets[t].offered%>" id="<%=t%>-offered"></td>
|
||||
<td><input type="text" class="offered" value="<%=tickets[t].offered%>" name="<%=t%>"></td>
|
||||
<td><button id="<%=t%>-action" type="button"> QRCode </button></td>
|
||||
</tr>
|
||||
<% } %>
|
||||
<tr>
|
||||
</tr>
|
||||
</table>
|
||||
<button id="Update" type="submit">Update Offered</button>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
@@ -96,13 +97,10 @@ document.body.addEventListener("click", event => {
|
||||
|
||||
|
||||
|
||||
const offereds = document.querySelectorAll("[id$=-offered]");
|
||||
offereds.forEach(el => {
|
||||
const id0=el.id.slice(0,-8);
|
||||
const OfferedEdit = document.getElementById(id0+"-offered");
|
||||
const ActionButton = document.getElementById(id0+"-action" );
|
||||
OfferedEdit.addEventListener('input', () => { ActionButton.textContent = "Update"; ooEdits[id0]=true; console.log("Changed OfferedEdit:",OfferedEdit.value); });
|
||||
});
|
||||
const offereds = document.getElementsByClassName("offered");
|
||||
const MessageArea=document.getElementById("message");
|
||||
console.log("Offereds is ",offereds[0]);
|
||||
for (let i=0; i<offereds.length; i++) offereds[i].addEventListener('input',(event)=>MessageArea.textContent= "Be sure to use the Update Offered button.");
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user