Categories
Mastering Development

Can’t insert Data into Database using AJAX JQUERY CODEIGNITER

So i’m trying to post data to the server and insert it into my database but i’m having trouble to do so ! the form <form name=”cart” id=”myForm”> <div class=”row”> <div class=”col-lg-6 col-md-12 mt-25″> <h6 class=”invoice-to”>Bill To</h6> <fieldset class=”invoice-address form-group”> <input type=”text” name=”Fullname” class=”form-control” value=”Full Name”> </fieldset> <fieldset class=”invoice-address form-group”> <input type=”text” name=”Wilaya” class=”form-control” placeholder=”Wilaya”> […]

Categories
CMS Magento Mastering Development

conditional knockout with ajax response

I created an default template for items in the minicart. The difference to the default template should be shown only under a specific condition. <!– ko if: $parent.myvalueactive(product_sku)==true –> some stuff <!– /ko –> I added a function in my javascript file, that gets loaded with the minicart: myvalueactive: function (target) { console.log(target); var aktiviert; […]

Categories
CMS Mastering Development Wordpress

(BAD REQUEST) 400 admin-ajax.php error WordPress

I updated my WordPress to current version as it was very outdated. And now I am getting a bad request browse issue now. /wp-admin/admin-ajax.php:1 Failed to load resource: the server responded with a status of 400 (Bad Request) browser pop up. This only occurs when user is not logged in admin. I checked plugins and […]

Categories
Mastering Development

POST request to 3rd party URL from Angular/NodeJS/ExpressJS

I’ve made an Angular app with a form for processing payment gateway action. I need to perform a form POST to a 3rd party payment provider with Angular Typescript with or without NodeJS/ExpressJS with the redirect. Problem is that in some cases when i perform URL redirect successfully I don’t receive any response from payment […]

Categories
Mastering Development

Add/remove spinner gif to infinite scroll?

I have the following code to add more data as a user scrolls down: $.ajax( { type: “POST”, url: “default.aspx/fGetData”, data: varData, contentType: “application/json; charset=utf-8”, dataType: “json”, async: “true”, cache: “false”, success: function (msg) { var myRes = JSON.parse(msg.d); $(“#ctl00_ContentPlaceHolder1_dvGridItems01”).append(myRes.pHTML); document.getElementById(“ctl00_ContentPlaceHolder1_HiddenFieldAJAXSortLetter”).value = myRes.strHiddenFieldAJAXSortLetter; document.getElementById(‘ctl00_ContentPlaceHolder1_HiddenFieldAJAXIsProcessing’).value=’0′; }, Error: function (x, e) { alert(“Network error”); } }); } […]

Categories
Mastering Development

Confused with building autocomplete select lists

this is my view: < td > < input type = “text” id = “AutoCompleteCustomerNumber” name = “CustomerNumber” class = “form-control” / > < span id = “CustomerNumberInfoField” > < /span> < /td> < td > < input type = “text” id = “CustomerNameInfoField” name = “CustomerName” class = “form-control” / > < /td> < […]

Categories
Mastering Development

Trying to print fetched data and move the element into another array on click of each button

Question : Create a PLP and PDP page with 20 products of 4 different categories (Electronics, Clothes, Appliances, Accessories) with unique SKU ID. The Quantity limiter should be between 1 to 1000. Add to Cart must add the product to the cart below (display it as a table with delete option). Pagination must be present. […]

Categories
Mastering Development

My jQuery Ajax success function not working, not displaying output of the console and not validating form

I’ve been toiling at this for some time. This survey is sending the data each time I click “submit”, regardless of what I put in there. I used to get the output and the (result.result == 1) message that’s at the bottom when I checked all seven questions but now it just silently sends anything […]

Categories
Mastering Development

How can i get the values of this Object? [duplicate]

Excuse my english, im from argentina. I have an object in JS called listaTurnos (obtained from a ajax call) var listaTurnos = [] $(document).ready(function() { $.ajax({ type: ‘POST’, url: ‘ajax/turnos2.ajax.php’, dataType: “json”, data: { item: “a” }, success: function(data) { data.forEach(e => { listaTurnos.push(e[“datos”]) }); }, error: function(data) { } }); }); console.log(listaTurnos) This is […]

Categories
Mastering Development

Pass json data to ASP.Net core 2 web api

I know that this question has been asked several times, but none of the previous solutions helped me out with my problem (that seems a pretty simple one actually). I just want to send a Json object to a Post method that I created in a controller class. Here’s the interesting portion of my controller […]