Sending changes to a sql Database without refreshing the page ASP.net core 2.0

110
March 13, 2018, at 5:33 PM

I have a bunch of draggable divs and i need to save their positions in a sql database when they are dropped, but i dont want it to refresh the page. Im thinking of adding some ajax call when the div is dropped but i have no idea what that ajax call would look like.

            var saveCoords = function ($left, $top, $id)
            {
               //AJAX call to save values to the sql database without refresh.
            };
            saveCoords(ui.absolutePosition.left, ui.absolutePosition.top, ui.helper.attr('id'));

Is there a way to do this, and if so how?

READ ALSO
Using math.random for A/B testing

Using math.random for A/B testing

Currently I have setup a piece of code to use for A/B testing based on 50/50But now I want to rebuild it to a 50/25/25 setup

121
FinalCountdown.js stop event handler not working

FinalCountdown.js stop event handler not working

i am using the adminLTE template and within that I have a FinalCountdownjs timer as follows:

129
.addClass() jQuery how to specify the CSS

.addClass() jQuery how to specify the CSS

I have a div and I want to put a display none when I click on itI am using bootstrap4 and It has a css style called "d-none" that put display none to an element

132
Strange bug. Javascript, , Trying to run a loop, but getting a blank error in Chrome console

Strange bug. Javascript, , Trying to run a loop, but getting a blank error in Chrome console

I'm running a loop on an array received from an obj {message:Array(22)} ajax callYou can see the array has length = 22

94