Questions tagged [ajax]

60609 questions
1

votes
1

answer
59

Views

Send data to another JavaScript file from a JavaScript file

I want to see the information of this admin in the panel when admin enters the panel. But there are more than one admin on the system. Therefore, I need to find the administrator who logs in to the system according to the mail entered from the login page. When I click submit button, I need to send t...
Engr. Arda
1

votes
1

answer
996

Views

Set Select2 selected values with JSON string

I have a select2 that's used to add multiple employees to a work permit. Adding the employees works with no issues but when the permit is viewed I need the added employees to be pre-selected on the select2. I can retrieve the values from the DB via ajax using a JSON string but the select2 only shows...
Drewy
1

votes
1

answer
47

Views
1

votes
1

answer
46

Views

How can I get ID from “ul” dynamic tag

I have the next situation. I have a button in HTML code. When I press one of the options from the button I call a function that constructs the content from other button. I have a ul tag in HTML code with a list of li tags inside. The value of this li tags are generated dynamically with a query datab...
olga fm
1

votes
0

answer
38

Views

javascript template for showing table body

I am using ajax for updating/refreshing the cart when an item is removed from the cart table to show the updated items. ajax functionality and logic is working but could not show the following template inside {% for furniture in cart.furnitures.all %} {% include 'includes/carts/remove-furniture.htm...
pri
1

votes
0

answer
482

Views

MVC Ajax, Post to Controller base64 string

In my project I send post json data object. One item of this object is base64 string. When base63 string is too long, my request doesnt reach to controller. In my opinion , due to length of parameter,it doesnt work. I couldnt find any solition. [HttpPost] [ValidateInput(false)] public ActionRe...
Çağrı Taçyıldız
1

votes
1

answer
865

Views

yii2 refresh modal after submit form

I want to ask how to refresh the modal after I submit the form in another action? I use yii2. Here is my code : index.php: The size button on my grid view will show the modal that returns the render ajax from action size in my controller. After that here is my size view: $form = ActiveForm::begin();...
Pasek Widi
1

votes
0

answer
54

Views

Adding code via addEventListener on ID's taken by AJAX

Yesterday, I've asked the same, but today I will try to be little more specific, with working example. I want to add some code by addEventListener. I would use DOMContentLoaded, but ID which I'm trying to select is not available on page load. It's taken by AJAX GET method. I could use mouseover, bu...
servitus
1

votes
1

answer
261

Views

Not able to bind data from local json to view polymer 2

I am using Polymer 2 and want to bind data from a local json file. But each time I tried it it is not able to fetch the json file only. There are 2 ways I have tried to achieve it with: 1) USING Folder Structure: [[item.nickname]] [[item.phone]] I have also imported both iron-ajax and iron-list 2)...
1

votes
1

answer
212

Views

Yii2 Grid View Filtering using ajax not Pjax

How to get the value of the attribute in yii2 using ajax not Pjax to filter the Gridview ?
Mohamad ali Zayat
1

votes
1

answer
58

Views

jQuery(ajax) submit form

I am having some issues with $.ajax post method. I would like my form to submit form data while on the current page, however for some odd reason my script is redirecting to the action page. Please could someone identify what's causing this to happen and how I can resolve this problem? Here is my scr...
Crossfire151
1

votes
1

answer
2.1k

Views

How to populate modal window by entity from controller in thymeleaf by ajax query

I want to show a particular user with the help of a materialized modal window by clicking on 'view' button. I'm trying to do this by ajax query to my controller. Also I have an error: There was an unexpected error (type=Internal Server Error, status=500). Exception evaluating SpringEL expression: '...
Vitaly Park
1

votes
1

answer
353

Views

How to use AWS Polly PHP SDK via AJAX to stream in HTML5 audio player

Goal: To synthesize speech via AWS Polly PHP SDK (not javascript), return audio blob to browser via AJAX request, and stream with HTML5 audio player. So far I have the query to AWS working and AJAX request returning the AudioStream resource to the browser, but Firefox is complaining about the format...
Hayden Seitz
1

votes
1

answer
537

Views

session_start cause 503 error with php7.0-fpm

I have olds applications (PHP 5.3, Apache 2.2) that I must migrate to PHP7.0-FPM and Apache 2.4 (with Docker). All applications seem to work except one. This application use Prototype 1.6.0.3 and when Ajax.Request is called, a 503 error is displayed (after the line this.transport.send(this.body);)....
M4kn4sh
1

votes
0

answer
42

Views

Ajax data do not show in table?

I have Allocate_classRoom DB table where I want to show data using ajax function departmentQuery() { var department = $('#department' ).val(); if(department!=' ') { var urls = '{{ URL::to('roomAjax') }}'; var request = $.ajax({ url: urls+'/'+department, type: 'GET', dataType: 'json' });...
KaziBablu
1

votes
2

answer
791

Views

load more data from table using ajax and php

I have 7 data in my database I try to load my data from table using ajax and php. but after I click the button load more the data is showing but load more button is gone. here my index.php code https://github.com/jazuly1/piratefiles/blob/master/index.php here my ajax code $(document).ready(function...
jazuly aja
1

votes
2

answer
75

Views

Send JSON data via POST PHP instead of Ajax version

I have to create a JSON object that is the equivalent of a JSON object created with this Ajax code snippet: $.ajax({ type : 'POST', url : '?', dataType: 'json', data : 'username=' + encodeURIComponent($('input[name='username']').val()) + '&password=' + encodeURIComponent($('input[name='pas...
UrbiJr
1

votes
0

answer
18

Views

API call works on my browser but not in my javascript code?

I'm trying to call the Binance API to get the LTC price in BTC and I tested the link on my browser 'https://api.binance.com/api/v1/ticker/price?symbol=LTCBTC' which returns the information I need but when I go to implement it in my code nothing happens and I don't get any errors in console either. A...
crypto virtex
1

votes
1

answer
60

Views

move_uploaded_file(); not working

I've just written a script to upload images and i've checked it for a long but I can't find where is the error. The entire code do what it's supposed to do but the move_uploaded_file(); function doesn't. Here is my code: HTML: Subir imagen: JS: $(function(){ $('input[name='file']').on('change', fu...
Ismael Quirantes
1

votes
1

answer
406

Views

Datatable how to pass data from input to controller

In datatable I have for every row one input,and I want to add some text to this input and for every input I want to take the text and save it into database Im using laravel and want to use ajax Now its working fine only for the first input but for the second whatever I wrote it will take the first i...
Hala ways
1

votes
1

answer
49

Views

Cannot append data to <tbody> element by Jquery append() Method

I have an application developed on ASP.NET MVC5. Following is the code of the controller: namespace ACCOUNTS2.Controllers { public class SelectDealController : Controller { private ACCOUNTSEntities db = new ACCOUNTSEntities(); // GET: /SelectDeal/ public ActionResult Index(string option,string sear...
Uzair Raza
1

votes
1

answer
214

Views

unable to find $wpdb variable with AJAX call

I'm creating an application in PHP for Wordpress and at this point, I'm trying to fetch a value from a database through AJAX every 2 seconds, and I've created a new file with the function that should be fired.
Filippo Momentè
1

votes
2

answer
200

Views

Ajax Call returns status 0 in mvc

I am looking to post the data from my view to controller using ajax. But when i tried with the below code, ajax call always fires error with status code 0 and not passing the data to controller. How can i modify my code to pass the data to controller. Any help appreciated thanks in advance. Submit B...
Muzz
1

votes
5

answer
49

Views

How to turn a string representation of a javascript object into an actual object?

I am trying to programatically create a javascript object (to be handed off to an AJAX Handler) by programatically concatenating strings. However (and this is very simplified): var data = '{ field1: 'Val1', field2: 'Val2' }'; Is not the same thing at all as: var data = { field1: 'Val1', field2: 'Val...
Klw Wallace
1

votes
0

answer
76

Views

Javascript doesn't work on dynamic content

I'm trying to learn javascript and jquery lately so I'm not so good yet. The page I'm currently struggling with is a news page. Basically news are article tags and are contained in two different main category divs. ... ... ... ... ... ... ... ... In each article there's a slideshow with pictur...
t2937941
1

votes
1

answer
40

Views

JSONP not working on json converted url

The answer from this question relating to JSONP does work as of. If there is a ? at the end of a url during .getJSON request it recognizes as a JSONP. However in my case it is not working. I have a url lets say (sanjokgrg.com/aboutme)which displays the whatever data queried from the about table,...
Sanjok Gurung
1

votes
0

answer
53

Views

How to print page numbering while printing in Chrome based on table header?

My HTML: Print aaaa Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vel volutpat ante. Pellentesque maximus ipsum vel tempus scelerisque. Quisque vitae nunc est. Aliquam dictum magna nec quam aliquet accumsan. Suspendisse potenti. Sed dignissim pellentesque lacus, vitae vehicula urna di...
Crazy
1

votes
0

answer
43

Views

Passed variable from php to ajax cant be used in SQL SELECT statements only in INSERT

as the title says. The variable I stored from php to ajax to another php cant be use in 'SELECT' statements in SQL only on 'INSERT'. I tried using the variable '$_POST['tweet']' in 'INSERT' statement in the SQL and it works. enter image description here but in select statement it doesnt work. I cant...
Joshua
1

votes
0

answer
140

Views

Gauge updates using AJAX

I am trying to update a gauge dynamically. From the following website I found the code to create a gauge http://bl.ocks.org/NPashaP/59c2c7483fb61070486835d15c807941. I used AJAX for updating the gauge but the needle is not moving.I use tornado web-framework to serve the gauge on screen. In the AJAX...
Knight
1

votes
1

answer
134

Views

Saving a data URL from Javascript in PHP through Ajax

For my project I need to save what's displayed on a canvas to a database. I am now quite familiar with the toDataURL() function, and the code below (essentially just a test) works, displaying the image twice. var canvas = document.getElementById('canvas'); var image = new Image(); image.src = '03Jun...
Stick_Giraffe
1

votes
1

answer
133

Views

sinon fake xhr server and polymer appLocalizeBehavior locales

I am developing a web frontend using Polymer. I have a webcomponent which uses other webcomponents, for example a paper-input or some custom webcomponents. For demo purposes i am using the sinon fake xhr server to mock some elasticsearch requests, which is really nice for testing. In the webcompone...
TobiasB
1

votes
1

answer
81

Views

Replace value in ajax

Trying to change attribute value in html response from ajax before render it. Questions How to change attribute value's value before render it? How to render html response with changed value in browser?
oreon
1

votes
1

answer
202

Views

Bootstrap 4 Modal will not close after using jquery .load

I have moved to Bootstrap 4 beta 3 but I am facing an annoying issue with modal; the modal after it shows will not close what ever I click. The Modal remote has been removed with BS4 so I used jquery .load() to load the modal contents once the button is clicked. Here is my main page: Projects List t...
J. Hamdan
1

votes
1

answer
497

Views

How To Trigger Azure Automation Web Hook From A Web Browser AJAX Call?

I have an Azure web hook on an Azure Automation script which accepts requests to do stuff from the web. The following little Powershell program tests the web hook and it works fine: $uri = 'https://s10events.azure-automation.net/webhooks?token=my_super_secret_token' $headers = @{'From'='[email protected]
Jay Godse
1

votes
0

answer
91

Views

DWR 3.0.2-RELEASE not work on wildfly + reverseAjax

I get this error (chrome console): engine.js:1691 POST http://localhost:9090/context-path/$%7BoverridePath%7D$%7BplainCallHandlerUrl%7D__System.checkHeartbeat.dwr 405 (Method Not Allowed) send @ engine.js:1691 send2 @ engine.js:1561 send @ engine.js:1525 dwr.engine.endBatch @ engine.js:279 dwr.engi...
robyp7
1

votes
0

answer
40

Views

Jquery Load Subcategory on click

can any explain which type of database needs to be created to run this code. pls confirm the format of data jQuery('.book-cat').click( function() { var book = jQuery(this).attr('book-cat'); var node = '#book-cat-' + book; jQuery(node).toggle('slow'); jQuery.ajax({ url: '/book/info/' + book, cache: t...
user3189017
1

votes
0

answer
30

Views

How do i pass array values obtained from multiselection in dropdown as filter in url of ajax call

I have a project dropdown.A user can multiselect projects. I want to pass the values selected from multiselection in dropdown as filter parameters in ajax url. The code is as follows: function CheckIfPresent(callback) { var proj = []; var urlprograms; if ($('#projNameDropdown :selected').text() != '...
user8481842
1

votes
0

answer
32

Views

Does anyone know how to successfully transition a vanilla Javascript app into an Node Express app so that it can deploy on Heroku?

I'm new to programming and I have a client-side Javascript app that utilizes an AJAX request in order to communicate with a chatbot. I have API keys that I hide, and when I run my app locally it works, but when I push to Heroku it doesn't recognize the variables even when I make Heroku think my app...
Ash
1

votes
1

answer
64

Views

pass string to server side with ajax in tapestry

${message:setname} @OnEvent(value = 'valueChangedSetName') protected void onValueChangedSetName(@RequestParameter(value = 'param', allowBlank = true) String setName) { TransferOrder to = baskets.getTransferOrder(); this.setName = setName; to.setComment('Rename from ' + this.setName + ' to ' + setNa...
Yupp
1

votes
0

answer
138

Views

How to send array of json objects to spring controller using ajax

I have converted all tables into json format using the below code: var table2 = $('#yTable').tableToJSON(); alert(JSON.stringify(table2)); How do I send these three json arrays to spring controller? In spring controller I want these json array of objects as separate params: [ {'Label':'A',...
mantelinga r

View additional questions