ajax

HEAD XMLHttpRequest on Chromium

I'm trying to get the HEAD response with an XMLHttpRequest in Chromium to retrive the location URL of a compressed url, but it fails: var ajax = new XMLHttpRequest(); ajax.onreadystatechange = function() { if (ajax.readyState == 4) alert(ajax.getResponseHeader("Location")) }; ajax.open('HEAD', "http://bit.ly/4Agih5", false); ajax.send()...

JavaScript: What would cause setInterval to stop firing?

I am writing a chat AJAX app. Randomly, in FF 3.5.9, setInterval() seems to stop firing. I don't have clearInterval() anywhere in my code. What could be causing this to happen? $(document).ready(function () { $("#no-js-warning").empty(); messageRefresher = new MessageRefresher(0); setInterval($.proxy(messageRefresher, "ref...

What's faster to parse lots of data (5Mb): eval or json?

I want to get, via ajax, a collection of data objects and parse them into JS data. Currently I have 2 choices: - Server returns valid javascript code and then I eval it. - Server returns JSON object and then I eval the json object What is the fastest of these in Firefox? (I only care about the "parsing" performance, not server or da...

passing input text value to ajax call

Hi, I have to pass string entered in the input text to server method calling through jquery ajax. But its not going through. can please somebody tell me what i m doing wrong here. Below is the code: $.ajaxSetup({ cache: false timeout: 1000000}); function concatObject(obj) { strArray = []; //new Array for (prop in obj) { ...

AJAX jQuery click results in function event being fired twice

I have an AJAX chat room module in Drupal and I am trying to insert BBCode stlye tex tags to the submit box when the user clicks Insert Tex. I managed to get the following code to work the first time but afterwards when I click Insert Tex it inserts the tex tags triple times. $('#edit-chatroom-message-entry-submit').click(function (e) {...

Accessing a master page from httphandler

Hi All, I am developing a small application in asp.net (writing in c#). In my application I am using jquery to perform asynchronous call to the server. I have an http handler that listens in to the requests and does what it needs to do. Problems start when in the handler I need to access information stored in the page , from where the...

How to call Ajax function recursively.

Hi guys, I want to know how to call Ajax function Recursively. My ajax code is like this, <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> var step='1'; $.ajax ( { url: 'test1.php', data: {step: step}, success: function(output) { ...

Ajax live search with PHP

I have tried live search from http://www.w3schools.com/php/php_ajax_livesearch.asp and i an struck in i need to get on mouse up and mouse down function for this code and i as i am new to ajax ... var xmlhttp; function showResult(str) { if (str.length==0) { document.getElementById("livesearch").innerHTML=""; document.getElementByI...

Jquery live not working in IE

Hi, I have some code that works fine in FF but not in IE. I have read other posts saying that the Jquery live method does not support change events but I am using a click event. Here is my code, it is inside $(document).ready(function(): $("a").live("click", function(e) { alert("link clicked"); //do stuff }); I...

Invalid Label - jQuery Ajax/Json request

Hi, I've been pulling my hair out over this; function status_update( token, loader ){ $("#status-submit").bind( 'click', function(){ try{ $("#status-feed-result").html( loader ); $("#status-input").attr("disabled", "disabled"); var status_input = $("#status-input").val(); $.ajax({ type: '...

Differences between testing JavaScript and testing Ajax ?

hi all, i was wondering if there is any difference between performing tests on JavaScript, or Ajax? I understand that JavaScript is part of the Ajax equation, but is there any forms of execution differences when i am performing tests for JavaScript or JavaScript which is used to enable AJAX? Best Regards. ...

Ajax back forward problem

i use Ajax in my page, and dynamicaly load content, but in this case my back/forward does't work. could you tell me how can i solve this problem? thanks ...

Gmail like URL scheme

I am working on a ticket system, having the following requirement: The home page is divided into two sections: Sec-1. Some filter options are shown here.(like closed-tickets, open-tickets, all-tickets, tickets-assigned-to-me etc.). You can select one or more of these filters. sec-2. List of tickets satisfying above filters will be displa...

calling asp.net mvc action method using jquery post method expires the session

hi, i have a website where i provicde a link. On clicking the link a controller action method is called to generate a zip file after creation of zip file is done, i show the link to download the zip file by replacing the link to create a zip with the link to download the zip. the problem is that after zip file creation is over and link...

Which is the most memory leak safe approach.

I have a table of frequently updated information. This is presented using a container div with a div for each row, each row containing 10 divs. I am using setInterval to call a an asmx webservice that returns some json formatted information. On the success callback I call $("#myContainer").empty(); on the container div and recreate the...

Dojo Widgets not rendering when returned in response to XhrPost

I am trying to capture the selected item in a Dijit Tree widget to render remaining part of the web page. Here is the code that captures the selected item and sends it to Django backend: <div dojoType="dijit.Tree" id="leftTree" store="leftTreeStore" childrenAttr="folders" query="{type:'folder'}" label="Explorer"> <script typ...

FirePHP not returning ajax request queries, yet returns normal page load queries

I am using firePHP(Zend profiler) on on FF 3.6.3(firephp addon installed) and it returns queries, when I do a normal page load. Ajax requests, however, are not returning the proper queries. I am using Prototype 1.6.0.2 for ajax requests. Is there something I am missing? Most of the write-ups seem to imply that this should work by def...

Ajax : Internet Explorer error

I am working on a login form. The Ajax code is as follows: /* ---------------------------- / / XMLHTTPRequest Enable / / ---------------------------- */ function createObject() { var request_type; var browser = navigator.appName; if(browser == "Microsoft Internet Explorer"){ request_type = new ActiveXObject("Microsoft.XMLHTTP");...

jquery ajax, array and json

I am trying to log some input values into an array via jquery and then use those to run a method server side and get the data returned as JSON. The HTML looks like this, <div class="segment"> <div class="label"> <label>Choose region: </label> </div> <div class="column w190"> ...

ajax call returns null in my facebook iframe !!!

Hi, I am using jquery to send an ajax request from my facebook app which is in iframe to my server. The ajax request works fine when the web app is running stand alone and out of facebook platform, but within facebook, the result that I get from my ajax request is blank !!! Here is the code I use: $.ajax({ url: 'http://mydo...