skip to Main Content

Javascript – Razor page issue .net 8

This is a Razor page issue. I have simple text box and corresponding search button created in the razor page, say it as index.cshtml. <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Search Button Example</title>     <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>     <script>         $(document).ready(function () {             // Disable the button initially             $('#searchButton').prop('disabled', true);             // Enable button if text box has value             $('#searchInput').on('input', function () {                 const inputValue = $(this).val();                 if (inputValue.trim() !== "") {                     $('#searchButton').prop('disabled', false);                 } else {                     $('#searchButton').prop('disabled', true);…

VIEW QUESTION

Javascript – I need to fire an event for the IndexModel when the user closes the page

This is my code: <script> function sendFieldData() { var email = document.getElementById('EmailComprador').value; var telefone = document.getElementById('TelefoneComprador2').value; var nome = document.getElementById('NomeComprador2').value; var data = { CostumerEmail: email, CostumerName: nome, CostumerPhone: telefone, }; if (email) { let curfetchUrl = `${window.location.pathname}?handler=SaveAbandonedCart`; fetch(curfetchUrl, {…

VIEW QUESTION
Back To Top
Search