jquery-ajax

How does the backend look for AjaxLink() call in Zend Framework

I'm trying to make some ajax-functionality in my web application, but I cannot get all puzzle pieces to fit: I want to add a link that, when clicked upon, will open a new input (text) field that can be filled by the user. In the back-end, I want to do some administration that the link is clicked. I want to do according to the Zend Fram...

ASP.Net MVC & jQuery Form Plugin Uploading a File

Can someone give me an example of how to do this with ASP.Net MVC? I have followed the example at their site on the file uploads tab but I cannot get a decent response back. My controller thinks that it is not a AJAXRequest and tries to do a RedirectToAction but that doesn't change the page after the post. ...

How to deal with session timeouts in AJAX requests

I'm sure you're all familiar with the voting systems that use AJAX (Um... look right over there <----) I have something similar and when you vote up or down it uses AJAX to request the new value from votes.php. The problem is that I am using a session to get the userid so a person can only vote once. What happens if they sit on the page...

Jquery Tabs: spinner option not working

I need an ajax animation while the remote page is loaded in tabs. I am using $('#tabs2').tabs({ spinner: ''<img src="../../Content/images/Jquery/spinner.gi'' }); Even $('#tabs2').tabs({ spinner: 'Loading..' }); also doesn't works ... Though the tab functionality is working but the animation is not working ... I am using JQuery th...

Downloading a file onto client in ASP.NET MVC application using JQuery

Hi, I have a ASP.NET MVC controller with a method which needs to serve up a file to the client(browser). The controller action is invoked with a JQuery $.ajax call. The user needs to be prompted to download the file once the controller action has finished. I used Response.Transmitfile/Response.WriteFile in the controller method but both...

Can't return Dictionary(Of String, String) via GET ajax web request, works with POST

I have the following web method: <WebMethod()> _ <ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=True, XmlSerializeString:=True)> _ Public Function GetDictionary() As Dictionary(Of String, String) Dim d As New Dictionary(Of String, String) d.Add("key1", "value1") d.Add("key2", "value2"...

What is wrong when I get "Internal Server Error" returned from a jquery $.ajax call on an ASP.NET MVC project?

Here is my ajax call: response = $.ajax({ type: "POST", url: "/Row/getRowName", dataType: "json", data:({ currRow : rowName, offset : 5 }), error:function(request){alert(request.statusText)}, success:function(result){alert(result)} }).responseText; I get I...

Can you call a method from a Controller if the View was created from a different Controller?

Say I called Index() from the HomeController which returns the view Index.aspx, can jquery ajax in javascript on Index.aspx call a method in another controller (ExternalController)? $.ajax({ type: "POST", url: "/Home/sayHi", dataType: "json", data:({ currRow : centerPost[0], offset : ((-1 ...

Trying to check each form input and blank its default value in jquery ajaxform()

I am using the ajaxform() plugin, which so far is working well. However, my input fields have default values, and if the user just submits the untouched form, I need to blank them out before the form is submitted using the beforeSubmit: callback. In nutshell, I don't know the syntax to check the forms input fields and stop the submit i...

Problem passing JSON data using jQuery $.ajax() to .NET MVC Action w/ custom BindingModel

I am trying to pass JSON data from the client browser to an ASP.NET MVC Action using jQuery $.ajax() and bind it to a .NET class using a custom ModelBinder. THE CLIENT JAVASCRIPT: $('#btnPatientSearch').click(function() { var patientFilter = { LastName: 'Flinstone', FirstName: 'Fred' }; var jsonData = $.toJSON(patientFi...

Cannot clear out values from ajax post

(This post is vaguely related to a previous question, but since then I've rewritten a lot of code and it makes sense to start again.) I am using the jquery form plugin to submit a form to a cakephp action. I use the 'toggleVal' plugin too, to give my input fields placeholder text. All I am trying to do is to use the beforesubmit callb...

jQuery AJAX slow in Firefox, fast in IE

I'm using jQuery to post to an ASP .NET Web Service to implement a custom auto-complete function. The code works great, except it's slow in FireFox (can't get it to go faster than 1 second). IE is blazing fast - works great. I watch the post in Firefox using Firebug. Here's the service code: <ScriptService(), _ WebService(Namespace:="h...

Getting "invalid label" error in JQuery calling a WCF service

Hi all, I'm uisng JQuery 1.3.2 and having problems with something that used to seem to work. I'm making a call to a WCF service in another domain. My call is hitting my service and getting back a valid JSON object, but I keep getting this "invalid label" error. var url = "http://.../GetEmployee?callback=?"; $.getJSON(url2,{empolyeeN...

jQuery's .load() not working in IE - but fine in Firefox, Chrome and Safari

I'm hitting my head on the wall against this one ... I have the following code: $("#home").click(function(e) { $(".tabs").attr("src","tabs-home.gif"); $(".islice").hide('fast'); $(".islice").load("home.html"); $(".islice").show('fast'); e.preventDefault(); }); It works perfectly fine in Firefox, Safari and Chrome...

jQuery should I use multiple ajaxStart/ajaxStop handling

Maybe there is no difference, but is either way better than the other (or perhaps a mysterious 'third' way better than both!)... first: var startTime; $(document).ready(function() { $("#lbl_ajaxInProgress").ajaxStart(function() { // store the current date/time... startTime = new Date(); // update labels $(this).text('...

jquery functions doesn´t work after external loading

hello everyone! I have a website.. with three div columns, colA colB and colC. on colA i have a menu that triggers some ajax functions to load text on colC and thumnails on colB. it works perfect.. here it is a piece of code. var loading = $(".loading"); var content = $("#colC"); var thumbs = $("#colB"); $("#menu li a").clic...

Difference Between $.getJSON() and $.ajax() in jQuery

I am calling an ASP.NET MVC action public JsonResult GetPatient(string patientID) { ... from JavaScript using jQuery. The following call works $.getJSON( '/Services/GetPatient', { patientID: "1" }, function(jsonData) { alert(jsonData); }); whereas this one does not. $.ajax({ type: 'POST', url: '/Services/GetPatient', data:...

How to return bool from MSFT-MVC action to jQuery $.ajax()

I am calling a MSFT-MVC action using jQuery $.ajax() public bool SetActivePatient(string patientID) { which returns a boolean. The $.ajax() call is always firing the error option. $.ajax({ type: 'POST', url: '/Services/SetActivePatient', data: { 'patientID': id }, dataType: 'text', success: function(returnVal) { if (ret...

jquery .ajax, google visualisation and problems getting them to work together

Hi, I'm trying to use jquery's .ajax(), google visualisation annotated timeline and one of the google datatable helpers together. Ultimately what i'm after is having a link on a page and when the user clicks it data is loaded asynchronously via jquery.ajax(), returned as google visualisation compliant JSON and passed to the charting API...

Multiple update target ids with Ajax.ActionLink ASP.Net MVC

Is there a way to specify multiple update target ids with Ajax.ActionLink so that I can render a set of partial views on callback? The problem that I'm seeing is that Ajax.ActionLink only provides one target id for me to update, but what I need is to update multiple regions of the page with different data after an ajax call. Any help...