I am using in pages
what i want when some one press button done it does to data base
https://jainsamaj.vidyasagar.guru/tracker/
I tried this
<script>
document.addEventListener("DOMContentLoaded", () => {
// Fetch logged-in member details using Invision's JavaScript methods
const memberId = ips.getSetting('memberID'); // Fetch member ID
const userLink = document.getElementById('elUserLink'); // Get the user link element
const memberName = userLink ? userLink.textContent.trim() : 'Guest'; // Fetch member name or fallback
// Debugging: Log the member details
console.log("Logged-in Member ID:", memberId);
console.log("Logged-in Member Name:", memberName);
// Update DOM with user info
const userInfoElement = document.getElementById('user-info');
if (userInfoElement) {
userInfoElement.textContent = `Logged-in Member ID: ${memberId}, Name: ${memberName}`;
}
});
</script>
<p id="user-info">Fetching user details...</p>
in a test page but ot just said etching user details.