ajax

Don't mix Response.Write with AJAX, but what about UI.HtmlTextWriter?

From the blog of the creator of the error message, if you mix Response.Write (among other things) with an UpdatePanel you will likely get PageRequestManagerParserErrorException errors. I was wondering, is it ok to mix UI.HtmlTextWriter and UpdatePanels? My guess would be that it would not be ok, but I'm not sure. With the limited testing...

Paged table with ASP.NET MVC and AJAX

I'm looking for good patterns for implementing a paged table of results in ASP.NET MVC with sorting, filtering, and paging provided via AJAX. It seems to me that I should have my controller actions provide only the data and not mark up to maintain the separation of concerns -- so the Ajax callback would provide new table data and pager ...

For our next project I would like to get into some AJAX to improve the user interface. Guidelines and advice?

Our team is experienced in web development (tomcat/Oracle) but not with AJAX on our existing projects. This is new technology for us, so I want to introduce this carefully and correctly. What should I look at in terms of frameworks or best practice or common pitfalls? ...

Extending every Ajax.Request onSuccess event (Javascript Prototype Framework)

Hi, I have an application that uses Ajax.Request and its onSuccess event handler in lots of places. I need to call a function (that will check the response) before all these onSuccess events fired. I tried using Ajax.Responders.register with onComplete event but it fires after Ajax.Request's onSuccess event. Any suggestions? Thanks, ...

Google gadget and ajax

I want to develop google gadget and i want to user AJAX push technology.Is that possible at all? I have found this http://softwareas.com/google-gadget-api-for-ajax-developers but i cant see the "push" part there. in short ... i want changes on my server to refresh my google gadget, is that possible and how? ...

How to know when all ajax calls are complete

I have a table style page with rows. Each row has a checkbox. I can select all/mamy checkboxes and click "submit" and what is does is a Jquery ajax call for each row. Basically I have a form for each row and I iterate over all the checked rows and submit that form which does the jquery ajax call. So I have a button that does: $("...

jQuery: Is req.readyState == 3 possible?

I am a big fan of jQuery and I use it for 95% of all my Javascript needs. However, I am a loading a live page using a COMET method; where in Javascript I retreive the data using AJAX at the point where req.readyState == 3. I was curious if it's possible to do this with jQuery $.ajax too (I couldn't find anything in the documentation). ...

Strange jQuery AJAX Firefox Issue -- Page Randomly Won't Finish Downloading

I have this strange issue with my web app. You see, I'm using jQuery with the Forms API and doing $('#MyForm').ajaxSubmit(api parms and callback function goes here). Randomly when I do this, however, and only on Firefox, the page load icon starts spinning, the page load progress bar runs in the status bar, and the stop button goes red -...

How to return JSON from a 2.0 asmx web service

I saw another question like this but it did not answer my question. I am using .Net framework 2.0 / jQuery to make an Ajax call to a 2.0 web service. No matter what I set the contentType to in the ajax call, the service always returns XML. I want it to return Json! Here is the call: $(document).ready(function() { $.ajax(...

Is there a Request.IsMvcAjaxRequest() equivalent for jQuery?

I prefer to use jQuery with my ASP.NET MVC apps than the Microsoft Ajax library. I have been adding a parameter called "mode" to my actions, which I set in my ajax calls. If it is provided, I return a JsonViewResult. If it isn't supplied, I assume it was a standard Http post and I return a ViewResult. I'd like to be able to use somethin...

Ajax "Is there new content? If so, update page" - How to do this without breaking the server?

It's a simple case of a javascript that continuously asks "are there yet?" Like a four year old on a car drive.. But, much like parents, if you do this too often or, with too many kids at once, the server will buckle under pressure.. How do you solve the issue of having a webpage that looks for new content in the order of every 5 second...

In AJAX how to retrive variable from inside of onreadystatechange = function ()

Hi Is it possible to retrieve variable set in onreadystatechange function from outside the function? --edit-- Regarding execution of functions: If its possible i would like to execute ajaxFunction() with one click and then popup() with next click, or somehow wait for ajax function to end and then call for alert box In pseudocode: ...

Difference between Multiview control and AjaxToolkit Tabs

Is there a major difference between the Multiview control in ASP.NET 2.0 and the Tab control in the AjaxToolkit? Other than the built in visuals of the tab control, is there anything different in the way they handle the hiding/showing of controls? ...

CompareValidator inside an UpdatePanel - VS2008

I'm using an UpdatePanel and want to put a CompareValidator on two text boxes, to verify that the user-entered password and confirmation are the same. This is working fine (I have VS2008 and am using .NET 3.5) out of the box, with one minor problem: The validation is firing as soon as the user clicks out of the first textbox, before th...

jQuery syntax error on POST in Opera

I have a little javascript function which is attached to an onClick event of a button. It appears to work perfectly in Firefox(3.0.4), but both Opera(9.62) and IE fails to execute any other JS from the same .js file, including what normally works. The following function is the culprit: function deleteComment(id){ $.post("ajax/comment...

Can I evaluate the response type of an $.ajax() call in success callback?

I am using jQuery to make an AJAX request to a remote endpoint. That endpoint will return a JSON object if there is a failure and that object will describe the failure. If the request is successful it will return HTML or XML. I see how to define the expected request type in jQuery as part of the $.ajax() call. Is there a way to detec...

Detect from browser if specific application is installed

We have an advanced webpage (ASP.NET, C#), and a application which needs to be installed on the client computer in order to utilize the webpage to its fullest. The application is a tray app, and has primarily two tasks. Detect when certain events happen on the webserver (for instance invited to a meeting, or notify of an upcoming meeting...

How to cancel an ajax query (from jquery) on the server side?

Sounds like a weird question, but say I have something like this: $.post( "/myajax.php", { "param1": value1, "param2": value2 }, function( data, status ) { if( status == "success" ) { $("#someid").html( data ); } }, "html" ); While myajax.php is doing whatever it needs to ...

How to cancel a file upload using dojo.io.iframe.send?

I am using the dojo.io.iframe.send method to send a file to my server. I want to provide a way that the user can cancel the send once it is in progress, in case it is taking too long or the user realizes she sent the wrong file. I can't figure a way to do this. I could use a timeout to terminate the send if it is taking a long time (tha...

Jquery's Ajax Property For Asp.Net 2.0

I always see the code like this in the blogs: $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "WebService.asmx/HelloWorld", data: "{}", dataType: "json", success: function(msg) { ...