ajax

Is there a limit to the number of Ajax requests that can be launched on Apache

Is there a limit to the number of simultaneous Ajax requests than can be launched toward an Apache server? For example, consider the following function to update div elements on a page (prototype JS): function trigger_content_update(cell) { //asynchronous : false is required for this to work properly $$('.update').each(function(update...

Extjs to call a RESTful webservice

Hello, I am trying to make a RESTful webservice call using Extjs. Below is the code i am using: Ext.Ajax.request({ url: incomingURL , method: 'POST', params: {param1:p1, param2:p2}, success: function(responseObject){ var obj = Ext.decode(responseObject.responseText); alert(obj); }, failure: function(responseObj...

transform pressed key values to english values

Hi, I have an input like this <input id="guestCard" name="guestCard" onkeypress="transform(event)" type="text" value="" /> and I want to transform the key pressed on a keyboard regardless of which language settings to english character. E.g. when I press on czech keyboard + (with keycode 43) , I want to get 1 (with keycode 49). Is the...

How to organize AJAX handlers in a large site?

Simple question...I am using an MVC structure to build my site (its fairly large, so it helps with maintenance. I am now starting to integrate a few fun AJAX functions to spruce things up for Javascript/AJAX friendly users. Since I am so anal about organization, I wanna store my ajax PHP handlers in a way that is logical, secure, and (h...

Why does jQuery insist my plain text is not "well-formed"?

I'm making an AJAX call to retrieve some plain text: $.ajax({ url: "programData.txt", type: "GET", dataType: "text", cache: false, success: processData }); When I make the request, though, I get the following error: Error: not well-formed Source File: file:///projects/foo/programData.txt?_=1...

What is the best way to process multiple transactions one at a time using ajax calls?

Note: Sorry for the amount of pseudo code below, but I didn't know how else to show what I'm trying. There is actually a lot more code than that in my solution that manages ajax icon's and status, but I've dumbed it down to show the root of my problem. Basically, I'm trying to create a process loop on a web page and I'm finding it to be...

Using Ajax.Updater to get a javascript file (prototypejs)

Here is my ajax request: new Ajax.Updater({ success: 'footer' }, '/dyn/actions/checkSystemMessage', { insertion: 'after', evalScripts: true }); Here is what's at /dyn/actions/checkSystemMessage: <script type="text/javascript"><!-- document.observe('dom:loaded', function() { buildSystemMsg = function(SystemMsg) { //behind ...

IE8 cache ajaxSubmit

I am using the following function to do a image upload/display The Target is the div where I am updating the content that is returned from the form function. I wanted ajax so I don't have to reload the whole page just to upload and see previews of the image. I upload a image, display it into the preview, I crop it, and do another funct...

how can i redirect the page with AJAX??

I am using Infragistics control in my application. If the user get deleted from my application then i want to redirect that user to not authorize page. for redirection of the page i am using HttpContext method but it's not working. I tried windows.location as well through java script but it's not working as well. Can somebody help me how...

Can a partial view be used to do Ajax item updates?

I have a table built from a list of defect codes. Can part of each row load a sub-table item complete with submit buttons? Sample table: <table><tr> <th>Code</th><th>Description</th> <th>Impact to your customers</th> <th>Impact to your associates</th> <th>Save</th> <th>Save Errors</th></tr> Where the first 2 columns are populated f...

RAILS - paperclip don't work with Ajax

Hi, i have an application working fine with form_for updloading an image using paperclip. The problem is, because of the javascript security model, it cannot upload a picture via AJAX. I would like to know: what is the best approach, that really works with rails 2.3.x, to send file via aJAX using rails? IFRAME technique? swfupload? Any...

How to implement Server push / long polling / comet using PHP and Javascript

How can I implement the comet / server push design pattern using PHP and Javascript? Essentially what I would like is something like this: User clicks a 'submit' button Javascript shows a message like 'Processing 0 / 100 items' Whenever a new item is processed, the php / server pushes out an update, and the javascript changes the mess...

Force Safari form AutoFill entry when using JavaScript to prevent the form's submit

I want Safari's form AutoFill feature to work on the forms in my web app. All of our form's submit events are prevented and instead we send data to the server via XHR (Ajax) POST. The problem is, Safari's default for creating a new entry in it's AutoFill (autocomplete) "database" requires the form's submit event to fire and bubble all t...

How often should a web chat client check for updates?

I am designing a web based chat feature for an application that will work sort of like facebook chat or google talk inside of gmail. I'm wondering if anyone has any advice on how often it should check for updates? Every 2 seconds? Every 5 seconds? 10 seconds? Also, should I call setTimeout in the callback function of setTimeout, or in t...

ASP.NET MVC Ajax and the CKEditor

I am working with MVC 1, and the CKEditor. I am integrating ajax forms which work great, but the editor window disappears after the ajax post. In webforms, I would have to not use ajax, or use a postback trigger. Is there a way to reload the editor on the ajax submission? Any help is appreciated. ...

How can I convert the result of this postgres db query into json to return to my jquery call?

I'm creating a contest sign-up page for our annual math competition at my school. It requires some AJAX like behavior when you click and select an item in a dropdown list. I've gotten an event to fire when I select something in the dropdown (I'm currently showing an alert box): <script type="text/javascript"> $(function() { ...

(rails) trying to add AJAX, but the ajax is returning an enormous try { .. } catch { .. } block

I am putting some ajax into a rails project. I am trying to refresh a div with the contents of a partial. page.replace_html("chemicals", :partial => "chemicals", :object => @chemicals) However, this returns a huge try/catch block, instead of re-rendering the partial correctly. any idea what's going on? the error is: try {Element....

How to use Facebook Share FBML button on a page loaded via AJAX?

I have a chunk of content that I load via AJAX and on that page I have a FBML share button. I also tried it without the FBML and just use the hyperlink and script tag. When I load the content directly, the share button loads fine, but when I load it via AJAX, the button doesn't show up. Any ideas on how to get the FB Share button work...

How to call a servlet from a jQuery's $.ajax() function

I am trying to call a servlet from jQuery's .ajax() function. At the moment I don't think I am even calling the servlet or passing paramaters to it, however lots of Googling doesn't seem to have helped. Any ideas? This is my html: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <script type="text...

jQuery, how to call a function while passing a variable

I want to use jQuery's .get method to send an ajax call to the server. I am using this line: $.get("InfoRetrieve", { },addContent(data)); As you can see I want to call a function call addContent and pass it the data that is retrieved from the server. The function addContent is below: function addContent(data){ $("#0001").append...