ajax

Ajax call for dependent comboboxes in joomla plugin 3.0

I am trying to get a ajax call working in a joomla plugin. In the plugin, there are two comboboxes: project level 1 and project level 2. Project level 2 is dependent on the project level 1 and gets loaded from a MySQL table according to the selection of project level 1 (table bda_level_2). The table bda_level_2 contains a field…
Read more

Can not return "result" in xhr.then (‘dojo/request/xhr’)

I have some problems when I return “result” in xhr.then() and I use dojo 1.10.4 Pls help me! The below code which connects to API with xhr (‘dojo/request/xhr’) in dojo: remandFlow: function(postData, flowId) { return xhr(this.REMAND_URL + flowId, { method: ‘POST’, data: postData, handleAs: ‘json’, headers: {‘X-CSRFToken’: cookie(“csrftoken”)} }).then( lang.hitch(this, function(result){ return result; }), lang.hitch(this, function(error){ return error; }) );…
Read more

how to increase the time gap of wait message

iam trying to show wait message while data is being fetched from database. iam using ajax to fetch the data. the message is already showing but it will disappear quickly. how can i increase the time gap for wait message ,that is the user can view the messge for atleast 4 seconds <input onchange=”mail()” class=”span6 m-wrap” type=”text” value=”” name=”mail_id” type=”text”…
Read more

MVC Ajax call not firing

I have a jquery function: function ExpireSession() { $.ajax({ type: “POST”, url: ‘@Url.Action(“LogOffSession”,”Account”)’, dataType: “json”, success: function (data) { }, error: function (data) { } }); } The action method that is called from the above function is: [HttpPost] [ValidateAntiForgeryToken] public ActionResult LogOffSession() { Session.Abandon(); FormsAuthentication.SignOut(); return Json(new { result = true }); } The jquery function is called(i tested…
Read more

How to include multiple td into the tr?

I just wanted to append td in the tr Table <table class=”u-full-width” id=”result”> <thead> <tr> <th>Project Name</th> <th>Id</th> <th>Event</th> </tr> </thead> <tbody> <tr> <td>Dave Gamache</td> <td>26</td> <td>Male</td> </tr> </tbody> </table> Script // Receive Message socket.on(‘message’, function(data){ console.log(data); var Project = data.project; var Id = data.id; var Event = data.event; var tr = document.createElement(“tr”); var td1 = tr.appendChild(document.createElement(‘td’)); var td2 =…
Read more

setter of selectOneMenu – jsf [duplicate]

This question already has an answer here: Invoke JSF managed bean action on page load 3 answers The setter of bean.name is not called after loading the xhtml page. But if i do a value changes in the Combobox the setter is called or if submit the setter is also called. But i Need to call the setter of bean.name…
Read more

XMLHttpRequest returns response before page is fully loaded

I’m trying to automate the search function at https://developers.arcgis.com/javascript/jssamples/#search/ using XMLHttpRequest, but the response is coming back before the results have loaded. If you put a search term like Layer, Geoprocessor, Legend, etc. on the end of the url above and load the page, the #sample-thumbs div will contain links to samples that contain the search term. It takes about…
Read more

Getting Variables on AJAX POST Process

I’m trying to POST something via AJAX but have a little problem which I couldn’t solve. I have a PHP foreach loop and a delete function. Basically, I want to delete some items in this foreach with AJAX POST request. I can make POST thing but can not get ID value. ID value is too important for me, ’cause system…
Read more

Cross-domain XHR with cordova-plugin-whitelist on PGB is Failing

Using : PGB cli-5.2.0 cordova-plugin-whitelist (i’ve tried both https://build.phonegap.com/plugins/4178 and plugins/3401 ) Refering to ( https://github.com/lukesmith123/whitelist-2/blob/18a8ce4/README.md ) i added <allow-navigation href=”*” /> , <allow-intent href=”*” />, <access origin=”*” /> My app is using an ajax request to get data from http that has “Access-Control-Allow-Origin”, “*”. But still get: Error Failed to load resource: the server responded with a status of…
Read more

jquery / javascript ajax not working when loaded into page via jquery load()

Have tried looking at answers similar but can’t quite understand it. I have tested the following code [www.mangocleaning.com/testing/pg1.php][1] and it works fine when used directly on its own page. However, when I load it via ajax load() to act as content within a current page it stops working. Can anyone help please? I copy and paste a lot and have…
Read more