Autocomplete Dropdown with Linkbuttons - or "AJAX gone wild"

Ok, so I want an autocomplete dropdown with linkbuttons as selections. So, the user puts the cursor in the "text box" and is greated with a list of options. They can either start typing to narrow down the list, or select one of the options on the list. As soon as they click (or press enter) the dataset this is linked to will be filtered by the selection. Ok, is this as easy as wrapping an AJAX autocomplete around a dropdown? No? (Please?)

Ajax firebug net monitor options

I have an issue where I executing an AJAX request. Instead of seeing the normal POST or GET preceeding the action page url, I see OPTIONS. The data is successfully posted, but there is no response from the action page. What does OPTIONS indicate?

Ajax How to handle multiple asynchronous errors on a single page?

This is not necessarily a Flex-specific question, but I'll use Flex in my example: Scenario: We have a fairly complex MVC Flex application that uses remoting and makes several asynchronous calls on a single page. Some of the calls are: GetUserOrders GetCurrentOrder GetUserDetails If there is a network or DB error, this will throw three separate error messages to the user and require three "OK" clicks. We are considering collecting all errors messages in a singleton array and displaying as a

Ajax call to wcf windows service over ssl (https)

I have a windows service which exposes an endpoint over http. Again this is a windows service (not a web service hosted in iis). I then call methods from this endpoint, using javascript/ajax. Everything works perfectly, and this the code I'm using in my windows service to create the endpoint: //Create host object WebServiceHost webServiceHost = new WebServiceHost(svcHost.obj, new Uri("")); //Add Https Endpoint WebHttpBinding binding =

How do I render a JSON view/response via AJAX using Spring MVC annotation-based controller for portlets?

I've spent the last six hours scouring Google and stackoverflow for an answer to this question. I'm originally a PHP developer, so bear with me - returning a JSON array from a PHP controller is trivial. I'm using Spring MVC 3.0, and I simply want to return a JSON object back to some Javascript from my Spring MVC Controller. It seems that there is no easy way to currently do this using a portlet ( Solutions I have seen suggest creating another Disp

JSF Request Parameter in AJAX Form

I have a Page that is called with a request parameter id that is used to select the drop down elements <h:selectOneMenu value="#{bean.selectedService}"> <f:selectItems value="#{bean.getServices(}" var="_s" itemLabel="#{_s.description}" itemValue="#{_s.value}" /> <f:ajax render="@all" /> </h:selectOneMenu> Is there any simple possibility that I can keep the in the AJAX request. Currently it is lost.

Ajax The status code > returned from the server was: 500

I have a page that is based on a master page, the page has a few UpdatePanel controls and things works fine. Problem starts when I try to update a hiddenfield control from my code behind like this - **Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load scrollerHiddenField1.Value = getLatest10() End Sub Private Function getLatest10() As String Dim db As New DataClassesDataContext Dim r = From p In db.LATEST10s Select p.carId Dim ret

Ajax render of Tomahawk t:tree2 only renders the first node and child nodes are not expanded

I have a form with a selectOneMenu and when I select the third "Visualizar todos los archivos" I want to render a <t:tree2>. All this is using Ajax to render the component when the value changes in the selectOneMenu. What's happening is that only gets rendered the very first node of the tree, and when I click on the + sign next to the folder it does not expand at all. This is my code: <h:form id="menuForm" enctype="multipart/form-data"> <h:outputLabel for="option" v

Ajax Django: is there a generic handler to insert a POST object directly into the database?

Django: is there a generic handler to insert a POST object directly into the database? I find myself writing a lot of handlers that look like this. def ajax_storeObject(request): if request.method == 'POST': Object( field1 = request.POST["field1"], field2 = request.POST["field2"], field3 = request.POST["field3"], field4 = request.POST["field4"], ).save() return HttpResponse(json.dumps({"status":"Su

Ajax Extjs - Sending extraparameters using method

I was wondering if there is any way to pass an array of objects as extra param of method ? For simple types params seem to work. Ext.define('RightGridModel', { extend: '', fields: [ {name: 'id', type: 'int'}, {name: 'rightText', type: 'string'}, {name: 'digit',type:'int'} ] }); var mod = Ext.create('RightGridModel'); mod.set('rightText', 'some text');{ url: "Hom

Ajax component updates before actionListener called?

I am using PrimeFaces <p:dialog> to launch a popup html page and <p:commandButton> to close it: This is what I do when Ok button is pressed: <p:commandButton id="submitButton" value="OK" actionListener="#{MultiFileSelectMgmtBean.actionOk}" update=":formID:fileTreeID" oncomplete="dlg1.hide();"/> Problem is that fileTreeID is updated before action listener is done. How do I force actionOk() to be called first, and then fileTreeID to be updated? Edit:

How do I make XHR/ajax requests against Google Apps Script ContentService work?

I have a simple Google Apps Script ContentService that emits a string like "Hello world Sat Jul 14 2012 14:17:21 GMT+1000 (EST)" The url is and it's open to anonymous. Feel free to hit it. The code is: function doGet() { var output = ContentService.createTextOutput() .setMimeType(ContentService.MimeType.TEXT) .setContent("Hello world " + new Date()); Logger.log(output.getContent());

Ajax Prevent re-loading of javascript if functions already exist. Otherwise ensure synchronous loading

Using JQuery.load(), I change the content of my website's mainWindow to allow the user to switch between tabs. For each tab, there is one or multiple scipts that contain functions that are executed once the tab content is loaded. Obviously when switching to the tab for the first time, the script has to be fetched from the server and interpreted, but this shouldn't happen if the user switches back to the tab later on. So, to put it short: Load() html make sure javascript functions exist, othe

ajaxSubmit into current jQuery Tab

I know how to grab the index, but that doesn't appear to be what I need to post into the tab itself. This is a continuation, but different question, from my previous post: Submiting jQuery form results back into dynamic tab My tab form is submitting now with 100% success, internal to my jQuery validate, but I want my reply to appear in the tab it came from. At the end of my jQuery validation I have: submitHandler: function(form) { var thisTab = $tabs.tabs('option', 'selected'); // what i

How do I show/hide a div with a progress bar using ajaxStart and ajaxStop?

I'm very new when it comes to programming so maybe this is a walk in the park for you guys. I want to create a div with a .gif-image of a progress bar, where the div should only be shown when pressing a button to for example save some settings to the database. This function is going to be used everywhere in the GUI and every time one a query is made towards the database. I'm coding with jQuery UI and I've been recommended to use ajaxStart() and ajaxStop(), but can't quite figure out how to use

Page navigation using ajax in codeigniter

IN codeigniter I am repeatedly using the controllers to load all the templates of my page.... I have divided the page into header, top navigation, left navigation and content and footer. This is what I do at present public function get_started() { if (test_login()) { $this->load->view('includes/header'); $this->load->view('includes/topnav'); $this->load->view('includes/leftbar'); $this->load->view('login_nav/get_started'); $th

Ajax close the Android app when connection timed out

I am developing mobile apps using phonegap. How do i close the Android application, when server connection timed out. I am using javascript ajax XMLHttpRequest object. My code: var xmlhttp = new XMLHttpRequest();'POST', url, true); xmlhttp.onreadystatechange = function () {XXXXX} var xmlHttpTimeout=setTimeout(ajaxTimeout,10000);function ajaxTimeout(){;} But the applicatipon still not closing. Regards, Vishnu

implement ajax push

This is a very general question. I intend to write a simple SNS which supports the client to send words(like twitters and facebook). Moreover, If there is a reply to someone's twitter, I want the web page to jump out a hint quickly. In this case, I do not want to use polling method. I search the internet and found that AJAX Push is a good way to implement that and I found that something Like APE or Comet. I use LAMP(apache server) architecture on my mac as a localhost. DO I need to change the se

Magento - newsletter pop code using ajax update in form

I have the below code that is being used in cms page pop up the problem im having is if you leave email address input field blank and hit the submit (in the case "Get Code" button, you briefly see the red validation message but then hides the form, shows the hidden div. why or how can I prevent this process, i want it to validate but proceed to show the hidden div content. Below is the code. <div id="pop-confirm" style="display: none;"> <h1 style="color: #000000; font-weight: bold;"&g

Ajax Spring MVC JSR 303 Validation with Json response validation errors from

Hi I was looking for everywhere but can't find solution. I am making an ajax call in Jquery function and submiting data from spring inputs form:input to Controller. Controller is validating date by JSR 303 Hibernate Validation and return errors by JSON to the same Jquery function (receiving data by Json) and displaying errors in jsp. Everything work fine but displayed error messages are only dafault or from message parameter from validation annotations. I want to take error messages from Valida

jquery ajax request with authentication

I have a JSP-servlets application which is deployed on tomcat.Now from my html I need to make web(Ajax) call and call the CQ5 webpage(which is entirely running in CQ instance). When i click on submit button, it goes in the error method of ajax call. Here is the code <link href="" rel="stylesheet" type="text/css"> <script src="" type="text/javascript">

Production server AJAX calls very slow compared to the same calls on local server

I've come across this problem recently after changing production servers. My application is very slow on the production server compared to the same application on a local server. Pending some investigation, it's the AJAX calls (made to an API located on another, external server). Whilst on my local server an AJAX call returns in a matter of miliseconds, on the production server the call is marked as PENDING in firebug and returns with a latency of up to 5-6 seconds. Everything else seems fin

ajax - not sending data which contains a hyphen

I have my code as such <script type="text/javascript" src=""></script> <script type="text/javascript"> $(document).ready(function(){ $("form#submit").submit(function() { // we want to store the values from the form input box, then send via ajax below var word = $('#word').attr('value'); var sentence = $('#sentence').attr('value'); var email = $('#email').attr('value'); $.ajax({

Ajax fadein effect for only the new posts

How can I add a fade in effect for just the new posts that are added when the 'load more' button is clicked? right now it fades in the new posts with the old posts together rather than not touching the old posts and just fading in the new ones $(document).ready(function(){ $(".load_more").click(function (){ $('.load_more').html('<img src="images/ajax-loader.gif" />'); $.ajax({ url: "loadmore.php?id=" + $(".ad_display:last").attr("id"),

How to redirect page with ajax?

Is it possible to redirect a page, not with window.location.href, ie reloading the page, but ajax, without reloading the page. url = ""; // Instead of reloading the page with that, there has t he writing ajax not reload the page? window.location.href = url; Thx

Drupal 7 - Ajax and Bootstrap - Rerender Main Menu on Login

How can I rerender the main menu in Drupal after an Ajax Login? I already tried the following (generating the return value in my PHP Ajax Controller): $tree = menu_tree_all_data('main-menu'); $returnValue = drupal_render(menu_tree_output($tree)); However this will not include the Bootstrap specific class names. It basically just returns a minimalistic menu structure without anything added by the theme. In the Bootstrap theme, the menu is rendered like this: <?php if (!empty($prima

How to pass search criteria to controller using MVC AJAX PagedList

I'm creating Advanced Search using MVC. What I mean by Advanced Search is user can do combination search, for example, user can search by category = 'Child' and name contains 'A' or age <= 10. then the result is displayed using MVC PagedList. I followed UnobtrusiveAjax tutorial based on example from PagedList source. I defined 2 files, Index.cshtml for View and _List.cshtml for PartialView. Index contains search criteria and a button to add more clause. and _List contains table for displ

wp_editor() in content that was loaded with ajax

I try to use wp_editor() in content that was loaded with ajax, but none of the required files and some other configuration script not loaded : The structure of ajax is something like this: function get_test_page(){ include( TEMPLATEPATH . '/page.php' ); die( main() ); } add_action( 'wp_ajax_nopriv_get_test_page', 'get_test_page' ); add_action( 'wp_ajax_get_test_page', 'get_test_page' ); page.php : function main(){ wp_editor('','unique_id'); } Editor is loaded but needed files is

Ajax Error when calling the URL for saving JSON in database: String is too long

This is the method from the controller api : [HttpPost] public void SaveFloor(int floorID, string json) { Floor floor = db.FloorSet.Find(floorID); floor.SavedJson = json; floorRepository.Update(floor); floorRepository.Save(); } Then I made an ajax call to pass the URL. function SavingFloor(FloorId, Json) { $.ajax({ url: "/api/Floor/SaveFloor?FloorID=" + FloorId + "&json=" + Json, type: "POST",

Confused with RESTful service and ajax

I'm not a good english speaker, give me mercy about the bad explanation As developing web, i am always confused about the RESTful's definition. OK, for instance, the client(i.e browser, mobile or etc) wants a user list so the client request a GET method url. domain/give_me_user_list gotcha! the server responses a json format data like this. { "users": [ { "name": "john doe" }, { "name": "john smith" } ] } Is this RESTful se

Ajax Request with Googlemap API

I'm building a page that will display a Googlemap with markers. Since I have about 50000 markers, I decided not to load them all at once. Therefore I tried building an JSON request to my server (see code below) but here is my problem: When I use the code as it is presented here, the Map is blank (no Map shows up). When I remove the $.ajax and leave the function getMarkers emtpy, the map shows properly (whitout marker of course). Can anyone tell me what I'm doing wrong please?! Thank you! (If

How to bind AJAX-loaded form to 'ngModel' [close]

Received <form method="post" action="/login.html" name="formLogin" data-ng-model="formLogin" data-ng-submit="submitLogin($event)" novalidate="novalidate" > <input type="hidden" csrf="csrf" data-ng-model="formLogin.csrf" value="" name="LoginForm[csrf]"> <input type="text" data-ng-minlength="2" data-ng-required data-ng-model="" placeholder="e-mail" autofocus="autofocus" name="LoginForm[email]"></div> <span cla

Stopping js ajax call from a specific user

I have done something silly and written a script for a website that does an ajax check every 2 seconds. In this case its using wordpress and its admin-ajax.php file every 2 seconds. This essentially burned up all the CPU power of the server, and made every site on the server run really slowly. After a lot of detective work, i finally found the script and stopped it, so that it doesn't happen on new loads of that website. But looking at my apache log, i can see that it is still running in one b

Ajax jQuery Authenicated Jenkins APIS Call

I'm having issues making an authenticated Jenkins API call - I'm trying to retrieve some JSON data. I'm using it on a webpage with jQuery - anyone with Jenkins experience, any ideas? Note: the password is the user API key from Jenkins. $.ajax ({ type: "GET", url: "http://jenkinsurl/build3/testReport/api/json", dataType: 'jsonp', username: "jenkinsusername", password: "1axxxxsdasde3ad8", success: function (){ alert('To test it worked'); } }); Thanks

FormCollection parameter is empty while using @Ajax.BeginForm and html5 controls

I'm developing ASP.NET MVC5 project with boostrap, jquery, jquery UI. Submit is working fine but FormCollection in create Action is arriving empty in HomeController. I don't know what I'm doing wrong or is missing. PLease need help. Below snippet code. Index.cshtml: <div class="modal fade" id="modal" tabindex="-1" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="butt

Ajax remove from cart woocommerce

Here's what I'm trying to do: Have a button that adds an item to the cart via ajax on the first click and removes the item from the cart on the second click via ajax. The adding part is easy because woocommerce has this built in by default. I've been told this can be done by: custom jquery code to change a classname for example so you can target the second click A new ajax endpoint to handle reducing cart item stock since WC doesn't have this built in. I can do the first part fairly easi

Ajax Force Origin in fiddler without breakpoints

I have created a rule in fiddler that sets the response header "Access-Control-Allow-Origin" to "*". but when perfoming a js Ajax request from the chrome console, the browser still throws a "Access-Allow-Origin..." error. It seems that the only way to bypass the error, is by applying the fiddler rule and fiddler Breakpoint After the response arrives. Is there any way to do this without turning on the automatic breakpoint?

Ajax Method not allowed in Index

please help with my problem I cannot make Ajax call from my main view in laravel. I am receiving FAIL: Method Not Allowed STATUS: error, the problem does not occur on other pages. I am including CSRF in header in ajaxsetup: <meta name="csrf-token" content="{{ csrf_token() }}" /> //SECURE OUR AJAX CALLS: var CSRF_TOKEN = $('meta[name="csrf-token"]').attr('content'); $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': CSRF_TOKEN } }); and I am using: $.post("test", function(data){ aler

Ajax working in Chrome but not in Firefox and IE

I have the following problem I am working on a big project and I have problem with an ajax call which returns html and in Chrome everything works fine but in Firefox or IE is another story. when I console.log the output chrome outputs the whole html received but the Firefox and IE return just an empty string if anyone has had the same situation I would gladly appriciate the help what could the reason be. :)

Vuejs Cannot Submit Form Ajax

I want to submit data via modal Semantic UI and Vuejs. But my form cannot submit data via Ajax. i'm tired to find the problem, maybe someone can help me. My View like this. <form v-on:submit.prevent="addProductCategory" class="ui form"> <div class="content"> <div class="description"> <div class="field" v-bind:class="{'has-error':}"> <label for="name">Name</label>

Simple TYPO3 Fluid fileupload with Ajax?

Currently I am stuck in finding a nice, compatible way to realize an Ajax-File-Upload in TYPO3 Fluid. I am aware of the Demo-Extension by Helmut Hummel on GitHub, but this is, as I see it, rather overkill for my needs and does not include "real" ajax submit. I absolutely DON`T want to have any page reload on that specific site. I want to build an ajax-upload of a csv-file, which gets analyzed by my own controller-action, the results shall be presented in a lightbox afterwards (confirmation step)

Send file to Django througth Ajax

I was working with data just POSTing or GETting through AJAX until a file wanted to cause some problems :P AJAX dosnt work if I have processData and contentType set to true. But if I set processData and contentType set to false, I got an CSRF TOKEN MISSING error. How can I send the code with 'csrfmiddlewaretoken' and be able to manage the file too. this is my jQuery code: $(document).ready(function(){ function getCookie(name) { var cookieValue = null; if (document.cookie

Ajax Scrapy POST request for load more button

I'm trying to scrape this for product names and prices. There's a load more button at the bottom of the page, I've tried using postman to modify the form data and 'productBeginIndex': and 'resultsPerPage': seem to modify the number of products shown. However, I'm unsure what's wrong with my code - it still returns the 24 products no matter how I tweak the values. I've tried using FormRequest.from_response() but it still just returns 24 products. import scrapy class PriceSpider(scrapy.Spide

Laravel Ajax on Update data getting Success Message on same Page

i am trying to update data using Ajax in Laravel, my data is being updated successfully but when i click on update it's success message is showing on next page, i want it to show message and updated data on same Page without loading page. Laravel Controller: public function update(Request $request, $id) { $teacher = Teacher::find($id); $teacher->efirst = $request->efirst; $teacher->esecond = $request->esecond; $teacher->save(); return

Ajax Upload file with Boostrap Modal on core 2.1

I want to upload a file and send to email. But I don't see how to do this with Bootsrap Modal. If you want any other information, tell me. I would like to send the attached file by email then also integrate it in my database and be able to download it. /[...]/ ==> Code that I didn't add, not useful. Edit : Otherwise how to do with Ajax ? My View : <form name="contact" method="post" asp-action="Validation"> @if (ViewBag.Alert != null && ViewBag.Alert

Access FormData object in Wordpress Rest API Route, send via Ajax

I have an input field, which of "type file", this is where the user can add the image. I have already added the image into the "FormControl object". My problem now is how do I get my file in my wordpress rest function. So i could move it into my file system. Please see below code: //html <div class="column-one"> <input type="file" name="employee-photo" id="employee-photo"/> <div class="upload-photo-warning

  1    2   3   4   5   6  ... 下一页 最后一页 共 96 页