skip to Main Content

Can't using ajax call api in dotnet core 3.1? – Jquery

my class api: [Route("Api")] [ApiController] public class ApiUsersController : ControllerBase { [HttpPost] [Route("Users/demo")] public ActionResult demo([FromBody]model data) { return "OK"; } } my script jquery: var model = {key: "123"} $.ajax({ type: 'POST', url: 'Api/Users/demo', data: JSON.stringify(model), dataType: 'json', contentType:…

VIEW QUESTION

Error on AJAX Form Submit for CodeIgniter 4 – Jquery

I am trying to save records using AJAX Form Submit for CodeIgniter 4. This is my Controller: `<?php namespace AppControllers; use CodeIgniterController; use AppModelsPeopleModel; class PreRegController extends Controller { public function index() { helper(['form']); $data = []; echo view('pregistration', $data);…

VIEW QUESTION

Hiding button by "Id" works, but clicking it not – Jquery

I execute the top portion here automatically. In this script I can easily hide "showLine" via document.getElementById("showLine").style.visibility="hidden"; no problemo, but document.getElementById("showLine").click(); will not fire no matter what I do... The button does not press onload.. <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> //Autoexecute on pageload…

VIEW QUESTION
Back To Top
Search