skip to Main Content

How to have another "alert" for every form in ajax requesting? – Jquery ajax

let getLoginPassSystem = function (getPassForgotSystem, getLoginCheckSystem) { $(document).ready(function () { $('#login,#lostpasswordform,#register').submit(function (e) { e.preventDefault(); $.ajax({ type: "POST", url: 'http://www.virtuelles-museum.com.udev/spielelogin/logsystem.php', data: $(this).serialize(), success: function (response) { var data = JSON.parse(response); if (data.success == "accepted") { document.getElementById('inner').innerHTML = 'Herzlich Willkommen'; // location.href…

VIEW QUESTION

How to use two forms in the Ajax request? – Jquery ajax

var getLoginpasssystem = function(getPassForgotSystem,getLoginCheckSystem){ $(document).ready(function() { $('#login' || '#lostpasswordform').submit(function(e) { e.preventDefault(); $.ajax({ type: "POST", url: 'http://www.virtuelles-museum.com.udev/spielelogin/logsystem.php', data: $(this).serialize(), success: function(response) { var data = JSON.parse(response); if (data.success == "accepted") { document.getElementById('inner').innerHTML = 'Herzlich Willkommen'; // location.href = 'index.php'; } else…

VIEW QUESTION

is there any way to know which button was clicked? – Jquery ajax

I have been making ajax requests many times. I need to know which button I clicked <button class="ajax-btn" onclick="function_1();">Ajax 1</button> <button class="ajax-btn" onclick="function_2();">Ajax 2</button> ... <button class="ajax-btn" onclick="function_10();">Ajax 10</button> // ajax request for each button var ajaxBtnVal = ""; //…

VIEW QUESTION

Getting error: Uncaught SyntaxError: JSON.parse: unexpected character at line 3 column 1 of the JSON data – In this almost valid code – Shopify

For the following code getting output $response=array(); $response['wheel_deg_end'] = (360*(ceil($wheel->wheel_spin_time/3))) + (360 - (($wheel_slice_number * 30) - 30)) + rand(-5,5); $response['wheel_time_end'] = $wheel->wheel_spin_time * 1000; $response['success'] = true; $ab = json_encode($response,JSON_NUMERIC_CHECK); echo $ab; Output: "{"wheel_deg_end":1743,"wheel_time_end":10000,"success":true}" and error in Json parse:…

VIEW QUESTION
Back To Top
Search