ajax

jQuery: Making simultaneous ajax requests, is it possible?

I am using jQuery to try and retrieve multiple pieces of data at the same time. The background of the requirement is that different bits of data take various lengths of time to become available, so I want to display each piece as it is returned. The problem is that the requests seem to 'queue', the next request does not go until the pre...

Process XML returned via Ajax with E4X?

I am loading some XML via Ajax. here is a snippet of the script: ajaxRequest.onreadystatechange = function() { if(ajaxRequest.readyState == 4) { document.getElementById('loading').innerHTML = 'done'; google_xml = ajaxRequest.responseXML; document.getElementById('xml').innerHTML = 'XML: '+google_xml.toXML...

Ajax deep linking?

I have made a flex app deep link before but now I want to make an ajax app deep link. I have no idea where to start. I assume I need a way to listen for when the #hash in the url changes and be able to read it. And I assume I need a way to update the #hash in the url. Does anyone know how to do all that? Thanks! ...

ajax request browser limit

A more generic questions to start. Is there a limit to the response size of an ajax request, if it is a JSON request? I am passing large amounts of data through a JSON request and running into a 'script stack quota is exhausted' message in FF3. Now in FF2 the quota was 4mb but in FF3 it is 640kb. I am wondering if this is JSON specific ...

ajax hidding div problem in IE

I have a javascript page which checks an email and username, this works fine in every browser but Internet Explorer. The div box where errors are shown should be hidden unless an error is given e.g. username taken or invalid email. If the email gets an error this is shown in the div tag, but doesnt work for username (in all browsers) b...

Stop page process.

Hi. I have worked on a problem for a couple of hours now. I want to create dynamic Javascripts which I load into the page when I need. This is a project built on Ajax technique. First I tried to do it by PageMethods but PageMethods can only be static due to viewstate and other things. The problem was that I wasn't able to program against...

Closing a popup window in Firefox 2 within an AJAX response handler

Given the following flow: 1) User clicks on a link, opens a popup window. 2) User does some things, clicks on a button to save changes. 3) Using AJAX, some data is POSTed. 4) In the AJAX response handler, the popup is closed and the main window refreshed. There is a problem in FireFox 2, where closing the popup within a response handle...

.Net Webservice won't take parameters for XML call

For some reason my webservice does not like the data I'm sending it. I keep getting the following error: System.InvalidOperationException: Request format is invalid: text/xml; charset=utf-8. at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters() at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest() ...

Can I access the href of my ajax request in the javascript of my request?

Here a sample use case: I request a simple form via an ajax request. I want to submit the result to the same page that I requested. Is there a way to access the URL of that request in the resulting request's javascript? Below is some code that accomplishes what I want via javascript AND PHP. The downside to this is that I have to inclu...

Ajax page part load and Google.

I have some div on page loaded from server by ajax, but in the scenario google and other search engine don't index the content of this div. The only solution I see, it's recognize when page get by search robot and return complete page without ajax. 1) Is there more simple way? 2) How distinguish humans and robots? ...

How can I stop jQuery functions interfering with each other?

I have two separate (but similar) bits of jQuery code. They both work, but interfere with each other. How do I properly format these functions to be unique and stop them effecting each other. Code block 1: $('#share-email').click(function(e) { e.preventDefault(); $("#socialbox-" + $(this).attr('rel')).load('<?php echo site_u...

Is there any mod_proxy equivalent for tomcat?

I'm trying to run modified JWChat (a simple javascript based jabber client) on tomcat 5.5. This application is based on ajax, and uses http binding in order to communicate with the jabber server (I'm using openfire). When running it on apache server, it requires redirecting of the requests to the http-bind using mod_proxy and it works. ...

XSRF protection in an AJAX style app

We're currently developing an entirely AJAX based app that will interact with the server via a RESTful API. I've considered potential schemes to protect against XSRF attacks against the API. User authenticates and receives a session cookie, which is also double-submitted with each request. We implement an OAuth consumer in Javascript,...

What's the best way to hold an ASP.NET page until long-running operation finishes?

Javascript? Metatag refresh? Response.Redirect (to self) Server.Transfer (to self) Ajax update panel? ...

JQuery - Storing ajax response into global variable

Hey All, Im still somewhat of a newbie on jQuery and the ajax scene, but I have an $.ajax request performing a GET to retrieve some XML files (~6KB or less), however for the duration the user spends on that page that XML content should not / will not change (this design I cannot change, I also don't have access to change the XML file as...

calling a VB.net function from javascript

Hello all, I need to find a way to call a vb.net function in my aspx page from javascript. I have a Jquery function that makes the .drop class .droppable, and whenever I drop a .draggable onto a drop target, my Jquery code successfully fires a java alert statement. All in pure javascript. What I need to do is some heavy math! I do unde...

Measure size of Web Requests and Responses

I am looking for a way to measure the size of web requests and responses that I make in my browser. I would need a way to measure regular requests, as well as ajax requests. I am trying to improve Ajax performance by decreasing request and response size, and I need some way to benchmark this on the client end as well as measure my progre...

ASP.NET MVC - How to get Ajax 'onclick' for a specific action (I need for Ajax.ActionLink what Url.RouteUrl does for Html.ActionLink)

Hi, REVISION I want add a onclick to a element that handles a Ajax request, not just a route-redirect. I have these options for a route-url. Html.ActionLink(params) Url.RouteUrl(params) 'returns JUST ActionUrl So I can go like <div onclick="javascript:location.href('<%=Url.RouteUrl(params)%>')"></div> But how do I generate t...

ASP.NET MVC - Can I create an invisible Ajax.ActionLink() ?

Is it possible to create an invisible Ajax.ActionLink? Ajax.ActionLink("", "Action", Args, AjaxArgs) The above doesn't work, LinkName (1st argument) cannot be Null or Empty... ...

ASP.NET MVC Ajax - Is it possible to execute a -GENERATED- Ajax link with keyboard input?

Is anybody able to -execute- a generated Ajax.ActionLink when a user presses a key on the keyboard? (This is needed for accessibility) NOTE: I'm using ASP.NET MVC + Microsoft Js libraries (...Ajax.js / ...MvcAjax.js) + jQuery Javascript to capture keypress (IE + Firefox) $(document).keypress(function(event) { if(event.keyCode == 2...