ajax

Jquery ambiguous ajax error

This is the gut of my ajax call. function ajax(path, requestData, successCallBack, errorCallBack) { return $.ajax({ error: function(xhr, textStatus, errorThrown) ç(xhr, textStatus, errorThrown); }, success: function(json){ successCallBack(json); } }); } When there is an...

The AJAX response: Data (JSON, XML) or HTML snippet?

I'm just wondering what is an "ideal" output format for the AJAX response? Pure data (JSON, XML) rendered into the page using some client-side JavaScript template engine? Or an HTML snippet rendered into the page "as-is"? What is your preference and why? ...

How can I pass a Textboxes value to my Ajax.ActionLink?

In my ASP.NET MVC application I want a user to add a value into a textbox and then press my Ajax.ActionLink. I want to do something like this: Ajax.ActionLink("Go", "Action", "Controller", new { value = textbox1.value }) Or how else can I get this textbox value back to my action? Jquery? ...

Using Yes/No Messagebox in Updatepanel AJAX.

I have a requirement where I ask user for confirmation and also display messages. The programmers used for this were from Windows forms background. Hence have used the MsgBox in every nook and corner. Even in business logic part they have used the Messageboxes which requires Yes/No style confirmation from user. When we tested the site ...

Checking for http authorization in mvc before ajax form post

In building a content management system that incorporates jquery ajax into it's GUI I have come across a hurdle. It seems that some customers spend too long thinking about what they are going to write and therefore the server session logs them out, naturally being the web they have no idea about this. When they attempt to submit the chan...

Ajax - How refresh <DIV> after submit

Hi, How refresh part of page ("DIV") after my application release a submit? I'm use JQuery with plugin ajaxForm. I set my target with "divResult", but the page repeat your content inside the "divResult". Sources: $(document).ready(function() { $("#formSearch").submit(function() { var options = { ...

asp.net Ajax timer control

i have a page with a timer control. when the page is loaded, it fires a function. my issue is that the title of the page appears initially, but after the timer control function finished, the string in the title disappears. I commented everything out of the timer function and the title in the string still appears. what am i doing wrong? ...

Getting ASP.NET Cookieless Sessions and JQuery AJAX to play together nicely

I have a web site that uses JQuery AJAX. With this JQuery code $.post("/ajax/getsomedata.aspx", {'id': id }, function(data) { dosomething(data); } ); When I run this with cookieless="false", id shows up in Request.Form. When I set cookieless="true", id is no longer in Request.Form. UPDATE, What I did I added...

Does the jquery load method provide ajax functionality equivalent to the Rails replace_html method?

The jquery load method loads HTML from a remote file and injects it into the DOM. For example, to load the feeds.html file into the div with the ID of feeds, you would do this: $("#feeds").load("feeds.html"); Is this an alternative to calling a partial with the Rails replace_html method or is the functionality slightly different? pag...

Ajax replacment for JavaScript prompt command

The JavaScript prompt command prompt("sometext","defaultvalue"); is a useful way to easily prompt the user to provide a value. But it can't really be a part of any polished web 2.0 application (The dialog looks horrible). Is there any existing component to display a modal dialog that will prompt a user for a value? I can use a pure J...

Help required in how to handle the click of a table column header link button which calls asynchronusly(uses AJAX) in WATIN

hi , I currently have a table column, on click of that column header , all the items under that column are sorted in ascending or descending order. This table column header link button makes use of AJAX to do the post back. Now i not getting a way to wait until the completion of the post back. i tried the following steps Link myLink...

UpdatePanel not refreshing display

I have an UpdatePanel inside of a custom control, and within that UpdatePanel are two placeholders. One is initially set Visible = false, the other true. Inside the visible one I have an ImageButton that toggles the visibility of the placeholders. I'm using this control on two different pages in my site. On the home page it works as ...

AJAX load of a rendered PNG not working

I am rendering a custom image based on some defaults and parameters in POST with a custom php script and the GD library. I am trying to build a custom form to allow users to select these parameters and then send an AJAX request to render the image and send it back and load a preview in the page. The problem is that the first preview ...

How does ASP.NET AJAX work when retrieving values from the server?

If I want to call a server function from javascript to retrieve a name of a person from a database (just as an example)... and I went... name = myServices.getName(userId); If I have a script manager with a service reference to a .asmx file that has the web method getName( int userId ) {} then this function should be called properly and...

Exception handling in Ajax Calls.

I have an application utilizing lots of AJAX requests (different actions are triggered via XHR requests). Some of those calls may result in exceptions. Each time I have to display an error message to the user. How can I organize error handling in this case? ...

Forcing page content to change through Javascript

I'd like to show some visual progress to a user during an ajax request. E.g when he clicks a 'process' button which makes an AJAX request to a server-side script, he will see a 'loading...' message and a graphic, but I also want to show him some progress of how much processing is done. E.g 5/10 processed, 6/10 processed... and so on. Is...

jquery ignores response

Hi anyone see why my alert won't work? <script type="text/javascript"> function SubmitForm(method) { var login = document.form.login.value; var password = document.form.password.value; $.post("backend.php", { login: login, password: password, method: method}, function(data){ ...

Why have "while(1);" in XmlHttpRequest response?

I'm playing firebug with Google Calendar. I happens to find that some XHR request has response like below: while(1);[['us','bW9yZ2FuLmNoZW5nbW9AZ21haWwuY29t 20090320/20090904 63378122163']] It looks like a JSON with prefix dead-loop javascript statements. I'm not sure why Google Calendar has such kind of XHR response. Is there any kn...

HTTP status code 0 - what does this mean in MS XMLHTTP?

I have an HTA (microsoft html application - just an offline html + javascript app) that is using the standard MS XMLHTTP COM object (Microsoft.XMLHTTP or Msxml2.XMLHTTP depending on version detected) via JavaScript to send some data back to the server. It is returning status code 0. This is apparently not a valid HTTP status code (they...

Ajax jquery confusion

This is probably straight forward but I'm a newbie and I need help! If I make an Ajax request which when successful replaces a section of the DOM with other data, how do I make the new data accessable to jQuery? ...