ajax

Rails UJS rendering js.erb template in IE

I have a RoR app running rails 2.3.8 which makes use of the Rails 3 style UJS to bind data-remote forms instead of using form_for_remote, the controller responds with a js.erb file from the server. Works beautifully in FF, Chrome, and Safari, but when run in IE it prompts you to save a file and does not execute the JS. My research so f...

"Update" function not working in IE 7 or 8 but works in Firefox

Internet Explorer seems to be ignoring this .live function call during updating records but it works fine in FF. if $("form#updateform").live("submit", function(){ line is changed to $("form#updateform").live("click", function(){ update function is working perfectly in IE but in Firefox if i click on any object it take...

Simply returning success or failure from ajax call in rails

I have a little ajax call that calls rails: $.ajax({ type: "POST", url: '...', data: ({ ... }), success: function(response, status) { console.log(status); } }); In the rails controller I'm simply deleting an entry from the database, and I simply...

Losing unicode Char when sending via query string in an AJAX call

Hello all, I'm trying to send some data in an Ajax call to update a record in the server var OrderNotes = $.ajax({ url:'AjaxActions/OrderNotesUpdate.aspx?OrderID=' + OrderID + '&Notes=' + $('#txtNotes').val(), async:false }).responseText; "Notes" are in unicode. When...

Is AJAX necessary?

In a setup the bandwidth is virtually unlimited, would ajax still be neccessary? Assuming that in future, badwidth will be cheap, will clients become thicker or thinner? regards. ...

Proper jQuery technique to disable button with ajax post then re-enble button onComplete

I have a button that performs an ajax post -- I want to disable the button, then perform my work, then upon completion -- I want to re-enable the button. My interaction includes swapping out the image button (to a grayed out image button), and presenting a spinner. When complete, I hide the spinner and restore the original button image. ...

Jquery ajax() call fails in IE8

I have the following code for submitting data using ajax from forms of class ajax. this works perfectly in Firefox, Safari and Chrome but fails in IE. ajax: function() { $('form.ajax').live('submit', function() { var form_ajax = $(this); $.ajax({ url: form_ajax.attr('action'), data: form_ajax.s...

javascript widget to display a book catalogue. (need re-ordering and persistent)

A book has several chapters, and each chapter has several sections. This could be deemed as either a two-level tree or a nested list. Now I need to display the catalogue of the book. And the user can drag-and-drop to re-order chapters and sections. Do you know any good javascript widget for this? After the re-ordering, the new orde...

Why should I test for both MSXML2.XmlHttp and Microsoft.XmlHttp version-independent ProgIDs?

I have read the MSDN blog post about the subject. And this question doesn't help me much either. As far as i can tell checking Microsoft.XmlHttp is enough. Someone could confirm me this bug? Are there any earlier version of IE which require detecting both? ...

iPhone fullscreen webapp without AJAX

I'm building an iPhone webapp (using JQTouch at the moment). It's a fullscreen app, you know, the ones installed on the home screen without the Safari chrome. If you tap a normal link (without AJAX that is) the link opens in Safari, taking you out of the webapp. Is there a way to build non-AJAX webapps for iPhone? The problem is AJAX i...

JQuery: Making a tab active

Given this website: link text How would one find an element and remove any class=selected and add it to the correct link? That way when history, models, and the like links will look become selected when clicked upon. ...

motools formcheck with ajax response integrated

I am using motools - formcheck to validate my input. When submit is pressed I want the validation of the input to send an ajax request so I added validate['required','%checkIfUsernameExists'] I have a feeling since JSON request is most likely asynchronous by the time the response is processed, el is now an undeclared variable. How can I...

Detecting ajax request with PHP on Lighttpd a web server

Hi there, I'm having some trouble with detecting a jQuery ajax request with PHP on a Lighttpd web server. Here's the following code (works fine on MAMP and Apache): if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') { // ajax (not recognized on lighttpd server) e...

Disabling browser cache when using AJAX

Why do you usually need to disable the browser cache when sending requests via AJAX? ...

How to integrate Disqus plugin for WordPress with JQuery Ajaxed content?

I have implemented JQuery Ajax for dynamic content retrieval for my WordPress blog. But now I have a problem with DISQUS plugin, it just do not load anymore, because page is not reloading. For other small scripts I have used LiveQuery plugin for JQuery and it worked out well, but DISQUS is too complicated for me. Maybe someone could give...

The image's dimension is different from when it's loading and after it loads.

I have a page that loads a lot of fairly large images (about 200 of 100Kb images [about 600 x 400 px]). What I'm trying to do is manipulate the photo if it's in portrait, as opposed to landscape. The problem I'm experiencing is that when i use javascript to grab a portrait photo's properties when it's loading, the height is significa...

ajax image as response in php

Hi, I want to display an image as a response to an ajax call using php.. Does anybody have the complete code for this?? Please help me out.. Thanks in advance.. ...

How do I perform an Ajax request to CouchDB (http://<usename>.couchone.com/)

Hello, Experts. I'm trying to create a simple AJAX (via jQuery) request to http://yourusername.couchone.com/ (alsmost the same as if I had installed couchdb on localhost) If I go to http://**yourusername**.couchone.com/ via Browser I'll get: {"couchdb":"Welcome","version":"1.0.1"} So, it looks like a serialized JSON. So I wrote a JS C...

jQuery Ajax Call, give offline/ "not able to connect" message

Yes, i have a normal ajax call that calls imback.php, that checks for new stuff if you have been blur for 50 sec. Now if you disconnects from the internet, and when you get on focus, it will not be able to get imback.php.(i think its 404 error) So i would like to make a offline msg/timeout thing, so it alerts "You have no internet conne...

Unable to access session variable in php script called using ajax

Hello, Consider the following scenario. I have three php files, file1.php, file2.php and file3.php located on my server. file1.php starts a session and sets a session variable say,var. I am able to access var using $_SESSION['var'] in file2.php. file3.php is called using jquery ajax functionality, but im unable to access $_SESSION['var'...