Questions tagged as 'ajax'

3
answers

Problems with belongs_to when using Ajax in Rails 4

I have three models in my application, Order , Product and Items . Within Items I have the following code: class Item < ActiveRecord::Base belongs_to :product belongs_to :order end I have a form where I ad...
asked by 12.02.2014 / 00:52
1
answer

Ajax locking page exchange (LongPolling)

I am trying to complete a connection using Long Polling, where the browser sends a request to the server and is waiting for a response. To prevent this port from being infinitely open, I created a routine so that every 10 seconds the server send...
asked by 17.10.2014 / 16:03
1
answer

Return PartialView with validations for an ASP Modal MVC 4

I have an Index screen, where is the table of registered people, on the same screen I have a new button that calls a Modal (boostrap) like this: <a href="@Url.Action("Add", "Pessoa", new { area = "Gestor" })" class="btn btn-primary" data-to...
asked by 21.05.2015 / 02:01
1
answer

Trying to upload JPG via Javascript and Ajax [duplicate]

I've created the following form below on a client's website, so that you can change a user's photo: <form id="formulario" method="post" enctype="multipart/form-data"> <div class="blocoCampo"> <span> Escolher nov...
asked by 28.06.2017 / 19:12
1
answer

Send data to upload images through ajax

<script type="text/javascript"> $(function(){ $("#oformulario").submit(function(e){ e.preventDefault(); var nome = $("#nome").val(); var email = $("#email").val(); var obs = $("#obs").val();...
asked by 20.08.2014 / 23:54
2
answers

File uploads via ajax

How can I do multiple uploads, that is, I have a screen with multiple input of type file , how do I pass this via Ajax to my server? I have tried with XmlHttpRequest , but it did not work, I would have it if I had a input...
asked by 02.07.2014 / 16:28
2
answers

Display a loader while processing ajax

You can display a message like: "Loading ..." while my ajax does the operation? AJAX $.ajax({ url: url, type: 'GET', dataType: 'json', succes...
asked by 18.03.2015 / 18:16
1
answer

AJAX request error - ASP. Net and JQuery

I have an aspx file where I created a script with an AJAX call to execute method populaGridMembros on table gwMembros , method is working perfectly and returning a string in JSON format, when I run $.ajax does not work, it...
asked by 16.01.2015 / 04:50
0
answers

How does Ajax pagination work? [closed]

I'm using script to do pagination through Ajax , which works assíncrona , the situation made me curious, because until then I had only used php+mysql , never php+mysql+ajax . If my bank has 30 registros a...
asked by 31.12.2015 / 00:46
4
answers

How to select a value comparison option?

I need to make "selected='selected'" in option whose value is what is written to the state variable retrieved in Ajax. How can I do this? $('#cep').on("change", function(){ $.ajax({ url: 'http://cep.republicavirtual...
asked by 20.10.2016 / 13:37