AJAX answers

  • 0answers
    How do I submit a form correctly via ajax inside an iframe?
    Confused and don't understand why this is happening. When trying to select a file inside the iframe (ajax must press submit) - the html parent is loaded into the iframe, and the form is not submitted. Help me decide! There is a parent page with an embedded iframe <iframe ...
    AJAX Nora Horn, Dec 6, 2019

  • 0answers
    Why modx ajax doesn't work on some mobile browsers?
    Good afternoon, on the site https://lesowik.com a very strange thing happens - pop-up windows "see prices" that are loaded by ajax. why doesn't it work on some mobile browsers? And it is very strange on one phone in chrome everything works well, but in Yandex it does not load the browser, ...
    AJAX Anonymous, Feb 3, 2019

  • 0answers
    How to shorten TTFB time?
    Hello. There is a search form for cities, when you type, an ajax request is sent and a drop-down list appears (5 cities). The form is rendered in the controller return $this->renderPartial($viewFile, [ 'cities' => $foundCities]); and then output in case of 200th answer ...
    AJAX Hanna Shelton, Sep 29, 2019

  • 0answers
    Why is the option select incorrectly selected when sending ajax?
    There is a select with options <select id="sel"> <option value="1">опция 1</option> <option value="2">Опция 2</option> <option value="3">Опция 3</option> ...
    AJAX Emerson Sanders, Dec 2, 2020

  • 0answers
    How to display Russian characters obtained from ajax?
    Need help, gentlemen. I make this request. main contains this { 'text': {val1: '1', val2: '2'}, 'text2': {val1: '1', val2: '2'}, } I put it all into the database. But how to display it correctly so that the Cyrillic alphabet is not encoded ...
    AJAX Anonymous, Jan 27, 2019

  • 0answers
    How do I remove the "Submit re-form" on page refresh?
    Good day. Wrote the simplest Ajax script. Everything works, but when the page is refreshed (Ctrl + R) this message pops up, even if the button has not been pressed. And yes, there is a similar post on this Q & amp; A, and it was asked 9 months ago. I just saw "Nothing in pure JS (I don't like ...
    AJAX Vivien Fletcher, Mar 11, 2019

  • 0answers
    Why doesn't PHP see POST request for ajax?
    There is ajax request: $.ajax({ url: '../index.php', type: 'POST', data: { 'auth_code': auth_code, }, success: function(response) { alert('успех!') }, error: function(jqXHR, textStatus, errorThrown) { ...
    AJAX Anonymous, Jun 14, 2020

  • 0answers
    How do I call the flatpickr calendar correctly in ajax?
    There are blocks loaded via ajax on the page and in these blocks there is an input with a flatpickr calendar Tell me how to call the flatpickr calendar in ajax-loaded blocks. I do this - but it works very strangely - the calendar is called after a few clicks on the input ...
    AJAX Anonymous, Apr 13, 2019

  • 0answers
    How to reload angular with ajax?
    There is a basket with the ability to log in, while it costs angular validation, if you log in and load the page via ajax, false angular validation is triggered.
    AJAX Anonymous, Jan 16, 2019

  • 0answers
    How modx ajax display migx & amp; value in snippet?
    Good day I ran into a problem there is a migx (group) field and a nested migx (product) in it, which I display via ajax. as a rule of thumb to specify & amp; value = `[[+ tovars]]`? does not work like this. below is the code of the script and snippet: <!-- скрипт запроса и ...
    AJAX Caroline Bowen, Mar 20, 2020

  • 0answers
    How do I pull the response from fetch ()?
    Made a small function that should generate a url from the data, execute an ajax request and return the result: async function get(model_method, data, request_method="POST") { //тут только генерируется url response = await fetch(url, {method: request_method}); text ...
    AJAX Archer Savage, Jun 5, 2020

  • 0answers
    How do I prevent the page from refreshing when submitting a form using ajax?
    Hello, I wrote everything so that the page was not updated, but one popup was closed and after sending another one was opened. But for some reason I was thrown to an empty mail.php file. Tell me what I wrote wrong? HTML <section class="modal"> <div class="container"> ...
    AJAX Graeme O'Brien, May 29, 2020

  • 0answers
    How to pass news title to form in popup?
    Good day! I have a page with a news component and each news has a button "Fill a form", when you click on the button, a modal window with a form pops up. In this form, in the field, I try to transfer the title of the news (so that it is automatically placed in the form field) But this field ...
    AJAX Anonymous, Sep 5, 2019

  • 0answers
    Send steam trade with js / php?
    You need to send an exchange offer to the incentive, through the official api. I need to repeat the functionality of one extension for a site for the sale of game items, where the exchange of items is carried out using an extension that itself sends an offer of exchange and makes sure that it is ...
    AJAX Eleanor Mathews, Jul 29, 2019

  • 0answers
    How do I continue with the ajax request code?
    The basketObject variable inside the refreshBasket () function is undefined. Async false / true tried it. Did not help. .done () looked but didn't figure out how to use in my case. let basket = { 'get': function(){ $.ajax({ type: 'post', url: ...
    AJAX Aiden Frey, Mar 19, 2020

  • 0answers
    How to execute jquery function if result in $ .post is equal. Or how to correctly create a condition when receiving a $ .post request?
    var email = document.getElementById('email').value; $.post(dle_root + "engine/ajax/controller.php?mod=registration", { email: email }, function(email){ $("#email").addClass(' is-invalid'); }); This $ .post request contains the received value of the email and email that I entered into my input ...
    AJAX Julian Kerr, Oct 18, 2019

  • 0answers
    How to correctly get 2 parameters in a function via AJAX and create conditions?
    I have 2 fields in the registration form: login and email And I tried to do ajax check for busyness for them. But something apparently went not according to plan, there is not enough knowledge. Please tell me how to make this mechanism work correctly? My ajax request: if("#email:not(:empty), ...
    AJAX Nicholas Guerra, May 18, 2020

  • 0answers
    How to check a json array for emptiness?
    I have an ajax request, the response of which contains an array with one object [{"status": "n"}], please tell me how to add a check if I get an empty array in the response. $.ajax({ type: 'GET', url: 'status.php', dataType: 'json', success: function (data) { $.each(data, ...
    AJAX Noah O'Neill, Nov 23, 2019

  • 0answers
    How to send a response from a DB with a while loop via Ajax?
    Hello everyone. Not so long ago I started coding, but I ran into this problem. there is a script that passes the parameters of the calculator and receives a response from the handler: var load_ajax;var load = function () { if(load_ajax) load_ajax.abort(); var data = { sum: ...
    AJAX Stella Duarte, Nov 11, 2020

  • 0answers
    Bitrix Ajax how to display a notification after submitting a form?
    There is a code like this: <?=CAjax::GetForm('method="POST"', 'action="/mail.php"', $arResult["AJAX_ID"], '1')?><input type="hidden" name="ajax" value="Y"><input type="hidden" name="js" id="jstext" value="N"><div class="modal-body" id="<?=$arResult["AJAX_ID"]?>"> ...
    AJAX William Grant, Oct 18, 2019