skip to Main Content

Load HTML with ajax

In my HTML page, I have a modal : <div class="modal fade"> ..... <div class="modal-body" id="{{ modalId ~ 'Body' }}"> **** I want load HTML with Ajax here ******************** </div> </div> I want to load HTML dynamically with ajax in…

VIEW QUESTION

Ajax hide deleted element(object) – Jquery

Learning Django and can't find solution. How hide deleted object on page. html {% extends 'base.html' %} {% load static %} {% block content %} <main class="container my-4"> <h3 class="my-4 border-bottom pb-1">Адреса <a href="{% url 'add_address' %}" class="float-right btn btn-sm…

VIEW QUESTION

Jquery to javascript. Post request

Friends, I'm converting Jquery to javascript and I'm having problems with this block of code: $.post('ajax_data',{action:'service_price',service:service,quantity:quantity,dripfeed:dripfeed,runs:runs}, function(data){ $("#charge").val(data.price); $("#dripfeed-totalquantity").val(data.totalQuantity); }, 'json'); I tried to do this, but it doesn't work for me const request = new XMLHttpRequest(); const url =…

VIEW QUESTION

How to pass this array from Laravel Controller via AJAX and create a button base on data

First I choose Color button: <form class="form form-variant"> {{ csrf_field() }} <button type="submit" class="btn btn-success checkbox_click" id="colorChange" style="colors: purple !important"> Color </button> </form> My javascript <script type="text/javascript"> $(document).ready(function(){ $('#myForm{{$skuItemVariant_colorJs->SkuColorId}}').submit(function(e){ e.preventDefault(); $.ajax({ url: "{{ url('product-detail/getsize') }}", type: "POST", data: $('.form-variant{{$skuItemVariant_colorJs->SkuColorId}}').serialize(), success:…

VIEW QUESTION
Back To Top
Search