ajax

If jquery POST to a PHP file will cookies work?

I use jquery for a login, it has the gmail type ajax login affect so the user never actually see the login page they are posting to, on this login backen script I set a cookie to remember a users email address, I am curious if cookies are able to be set if the browser never actually goes to the page, it just post to it? ...

Updating multiple DIVs via AJAX is inconsistent

I have an ASP.NET page that contains three DIVs, each of which is initially displayed via partial page includes - this works fine. Each DIV contains a grid of entries that can be paged through or sorted by a particular column. These updates are done via AJAX requests and this also works just fine. My problem occurs when carrying out th...

Jquery AJAX call: $(this) does not work after success

Hi, I am wondering why $(this) does not work after a jQuery ajax call. My code is like this. $('.agree').live("click", function(){ // use live for binding of ajax results var id=($(this).attr('comment_id')); $.ajax({ type: "POST", url: "includes/ajax.php?request=agree&id="+id, success: function(response) { ...

jQuery Table rows drag and drop plugin

Hi, I'm using this plugin to enable drag and drop table rows on a page. The plugin comes with a serialize function, which passes the ID of each table row to an AJAX function, like this: serializeTable: function(table) { var result = ""; var tableId = table.id; var rows = table.rows; for (var i=0; i<rows.length; i++) { ...

Django Jquery sortable - how to access POST data

Nearly have this working but... the javascript calls django like this: .sortable({ connectWith: '.object', update: function() { var order = $(this).sortable('serialize'); $.ajax({ type: "POST", data: order, url: "/fo...

Dojo - dojo.byId() over an ajax response

Hi all I'm using Dojo support for Ajax function handleSubmit(evt, targetUrl, submitForm, updateDiv) { dojo.stopEvent(evt); dojo.xhrPost( { url: targetUrl, handleAs: "text", load: function(response){ updateDiv.innerHTML = response; wireEvents(); return response; ...

SQL Mass Reordering of rows

Hi, I have a table with a list of records, and a column called order. I have an AJAX script to drag and drop the table rows up or down which I want to use to perform a query, reordering the rows as they have been dragged. In the PHP, I perform a query to get the current order of the records. eg 1, 2, 3 ,4 The AJAX function passes the ...

AJAX only access

I have recently started to code heavily AJAX supported scripts in PHP, thing is, the files being accessed by the AJAX calls can be directly used too, how to disable that? ...

AJAX Length Limitations

I understand that the maximum length for an AJAX call using GET is 2083 (at least with IE6.) Is there any such limitation when doing an AJAX call using POST? I've never used a POST with an AJAX call so I'm not even sure what other differences there might be. ...

ASP.NET MVC Session using jQuery

PROBLEM SOLVED: I was overlooking a very simple issue, and that is that this is actually two different apps running under one website. I modified the URL in the AJAX call slightly to reflect that and the problem is no longer happening. ORIGINAL QUESTION: I'm having a weird issue and I'm hoping someone can help shed some light on the s...

cancel or abort ajax call in ie 6,7,8

how can i cancel a simple js ajax call while its being performed? ...

jQuery Dialog not appearing when called.

I am trying to get a modal loading dialog to pop up while I make an ajax call but it is not showing up in the onClick function. If I slow it down with firebug and step through the loading panel will show up. Is this just javascript running ahead of itself? Is there a better way to do this? $(function(){ $("#loading_panel").dialog({...

Applying selected styles to a tab control after asynchronous postback occurrs

I have been going crazy over a problem with my tab control. It has to do with something messing up during ajax requests in ASP.NET and it's driving me crazy because I think I've gone through at least 50 different possible solutions to try to fix this problem. Let me explain. I have a Tab control (a TabStrip). Its simply a table (genera...

Can Ado Data Services replace my webservices which i use in ajax calls in my websites?

I used to create normal webservices in my websites, and call these services from javascript to make ajax calls. Now i am learning about Ado Data Services, My question is: Does this Ado Data Services can replace my normal webservice in new sites i will create? And if Yes, Can i put these Ado Data Services in a separate project "local o...

Why isn't this JavaScript executed?

I was actually not going to, and am afraid of asking such a silly question, but i have completely no clue what is going wrong here. My JavaScript function ahah(url, target) { document.getElementById(container).innerHTML = ' Fetching data...'; if (window.XMLHttpRequest) { req = new XMLHttpRequest(); } else if (window.ActiveXO...

HttpRequestValidationException on PostBack within UpdatePanel

HttpRequestValidationException occurs when I try post when txtBulletin contains any HTML, like "Hello<br />World" Bulletin.aspx <asp:UpdatePanel ID="upContent" runat="server" UpdateMode="Always"> <ContentTemplate> <div class="content bulletin-content"> <asp:TextBox ID="txtBulletin" runat="server" ...

Rails not accepting JSON in production.

I'm attempting to post a json object to my server, however for whatever reason it doesn't show up in production. In development params.inspect yields ({"format"=>"json", "body"=>"Wtf", "api_key"=>"xxx", "action"=>"comment", "item_id"=>"496", "controller"=>"api"}) And in production I get ({"format"=>"json", "action"=>"comment", "con...

Async. Postbacks cause Page_Init? (C#)

Hi, I'm experiencing a very strange problem... I have a regular ASP.Net webpage with a page_init and a page_load function. It is my understanding(from everywhere I look) that page_init gets called on the first page load(as in, not ever called in a postback) and page_load is called anytime something happens with the page.(It is very har...

Whats the best way to send array of objects from javascript to webservice?

I have in my javascript these 2 functions "classes": // product class function Product() { this.id; this.qty; this.size; this.option; } // room class function Room() { this.id; this.type; this.products = []; } I have my js logic which fills rooms and their products. Now i want to send array of rooms to a webservice to do some...

weird AJAX error

why won't this work? function login(){ if(window.XMLHttpRequest){ ajax=new XMLHttpRequest(); }else if(window.ActiveXObject){ ajax=new ActiveXObject("Microsoft.XMLHTTP"); } ajax.onreadystatechange=validatelogin; params='name='+escape(document.getElementById('name').value)+'&pass='+escape(document.getElementById('pass').value); /*IT F...