ajax

Jquery/Ajax cookie making ajax call

Hi, (Following on from my previous questions - earlier queston) This is the code I've ended up with, although it still doesn't work and is driving me crazy! Any help greatly appreciated. S $(document).ready(function(){ function initialize() { $.ajax({ type: "POST", ...

Server control - singleton for client side.

How do I create server control that will be single instance on client side for any user controls, nested masterpages etc. Also this class should be visible by intellisense in any place where it included, so i can write javascript code in any control: Manager.getInstance().add(someObj1); in other user control: Manager.getInstance().ad...

Update the content of a div via AJAX with jQuery when they're new events

I am doing a match "live timing" where an administrator sends to a database new inputs like: "Team A scores! 1-0". This is shown in a public website inside a <div /> and I want to get the new inputs and print it. I've never done something similar and I don't know what is the way to go. I also have some doubts: It's posible that the se...

How to stop the page postback using updatepanel

Hi Guys, I am using C#, Ajax for coding. Please see below code which I am using for ajax implementation. <div id="column2Container"> <ajax:ScriptManager ID="ScriptManager1" runat="server"> </ajax:ScriptManager> <div id="column2"> <ajax:UpdateProgress ID="uprogDestinationsTabs" runat...

CakePHP AJAX request fails to show new content and uses wrong layout

I'm using CakePHP 1.3.2 with jQuery 1.4.2 and I'm seeing some strange behaviour with AJAX requests. Intermittently, when clicking an AJAX pagination link I'll see 2 POST requests instead of 1, the first of which is via XMLHttpRequest, the second of which isn't. The first request never completes, but returns a full page using the default...

jsp with ajax two simultaneous requests only getting one response

I have a jsp page where I'm trying to send multiple (two currently) ajax requests at once, but I only seem to get the second response. This guy described my problem exactly, but his solution didn't work for me. Here is my js code: function createRequestObject(){ var req; if(window.XMLHttpRequest){ //For Firefox, Safa...

sending ajax form to jsp page

I have my ajax url placed as url:'save-form.jsp'. now how would i know that whether the form is submitted to jsp page or not. how can i check it from jsp end. When i click on submit it does not even redirect to the jsp page. id:'save-form', el:'pagingJson-grid', labelWidth: 75, // label settings here cascade unless overridden url:'sav...

Rails 3 UJS driver events

Hi, According to Simone Carletti blog post, Rails 3 ajax helpers have changed a lot. We are supposed to write more javascript with rails 3 than we used to with rails 2. I tried to figure out how to show up an ajax loading gif -while an ajax query is running- in the "rails 3 way". I came up with this kind of code, which uses javascript ...

JQuery AJAX Event Problem

Hi, I am having trouble fixing a bug in an existing ASP.NET MVC web site. One of the views has a series of text boxes where the user enters data. Each text box has some javascript attached to the blur event in order to post back to the server when the text is changed. More specifically the code is using the JQuery $.ajax method to make ...

Differentiate ajax call for different list items in listview.

I am using a listview to display some items and its owner name. All owners name are links and they are having same class and same id(since in listview). But I am displaying some information through an ajax call on mouse hovering the link. The ajax call retrieves data from database. But problem is that since I am using their css class as ...

Django: most efficient way to query many records?

Hello, I have a table with a few thousands records (products). Each product has a 4 different categories: CAT1 CAT2 CAT3 CAT4 I wonder if is there a method, or what is the best practice, to dynamically retrive the available categories based on the categories already selected (using Ajax). Example: if CAT1 = green all the products wit...

Comet Help on linux hosting

I have a shared linux hosting. Apache is running on it. My site is built in php. I have a chat application which uses ajax long polling. I want to turn it to comet chat. I do not have much knowledge about server things. Please help me step by step suggestion. It will be a great help to me. Thanks in advance. ...

Not getting values from Select Fields with jQuery

I'm trying to implement some basic ajax functionality in website I'm creating. I'm using the Flask microframework and jQuery to do this. I have a lot of experience with python, what Flask is written in, but very little with javascript. This would be why I decided to use jQuery. ;) There is a nice example included with the Flask documen...

Is there an alternative for Page.ParseControl in ASP.NET?

I have written a class library function that parses a string to a control. It takes the current page and uses page.ParseControl to parse the string as a control. System.Web.UI.Page page = (System.Web.UI.Page) HttpContext.Current.CurrentHandler; System.Web.UI.Control ctrl = page.ParseControl(str); It works fine in most scenarios excep...

How do I get the http return code from an XHR object in mootools

I am doing an AJAX request. In my onFail event of the Request I catch the XHR object. What is the name of the member in this object that holds the code. For that mater, I could not find a documentation that shows the list of members in that object. ...

Ajax, response body is empty

Hi all!!! I try to get data from server http://someserver12345.com If i download it for example with C# DownloadString or open it in browser it returns body with data and from FireBug's log Content-Length is equal to data's size. So all results are ok; For example response data can be json documents and by opening in browser each time s...

PHP Curl - Get data generated with AJAX

Hi, I want to get data generated by an AJAX request. In this page http://www.fipe.org.br/web/index.asp?p=51&amp;aspx=/web/indices/veiculos/default.aspx there are some html selects. When the user click on the first one (Marca), the second one is filled. I want to get this data. This is my code: <?php $curl = curl_init(); $postData = arr...

How to make a "hybrid" HTML drop-down list that can work as a text box as well?

For my website, I need to have a way for users to enter their cities. I'd like to use 2 drop-down list for that: a "State" and a "City" drop-down lists. The choices in the "City" list would depend on what "State' has been selected. However, there bound to be cases where a user's "City" is not in the drop-down list. To handle those case...

jQuery "Cannot read property 'defaultView' of undefined" error

I am using jQuery to post a form field to a PHP file that simply returns 1/0 depending on whether it worked or not... Extract of the code: $.ajax({ url: "ajax/save_text.php", //Relative?!? //PHP Script type: "POST", //Use post data: 'test=' + $(this).val(), datatype: 'text', //Pass value cache: fa...

Is it better to generate html for an ajax function in the JS handler or in the PHP ajax function?

I'm designing some UI's for a product and we want to utilize jQuery and PHP. The content to generate is a list of checkboxes (10-100) that a user will be modifying (removing multiple at a time and changing the entries). I thought I'd try something new and ask StackOverflow (read: you) what is preferred: generate the html in the php call ...