ajax

jQuery getJSON calls on webpage exit not working on Chrome 6 and Safari 5 (working in Chrome 5)

Issue: Attach a click event on a link on a page (say link to http://google.com/) Try doing an AJAX or getJSON (JQuery specific call) from the function bound to that click event The AJAX or getJSON call is never completed (even if we add an explicit half-second pause) Sample HTML page: http://paraschopra.com/temp/bah.html Sample Serv...

jQuery.ajax Response is empty or undefined

Hi I hava a big problem. I have to get some JSON form localhost:8080. The server side is a restful based jax-rs server. @Path( "/m" ) public class M { @GET @Path( "{id: [a-z]{1,4}-\\d{1,4}}" ) @Produces( "application/json" ) public Response getCar ( @PathParam( "id" ) final String id ) { final ResponseBuilder builder; b...

The role and scope of Ajax in modern websites. Finding the right balance.

My friend and I are building a website together, and he is insistent that page refreshes are a thing of the past and that we should build the whole website in AJAX. His only reason why page refreshes are 'annoying' is that they are too slow. However, the page is running fine without AJAX currently and when I click from page to page, ...

How do I show character count in YUI when editing a cell?

Hi, In the YUI datatable I want to limit the number of characters a user can type into one of the cells. I know how to properly display the amount using a formatter, but is there a simple way to change the editor box to show a "124/500" character count limit? ...

Register Client Script with Dynamically Loaded Control in Ajax Call

I have a page that contains a custom tab control. When you click different tabs, it does a an ajax callback. During that ajax call, the code dynamically loads a different control based on which tab was clicked, then adds it to the appropriate tab. So basically I have some code that does a switch statement, uses LoadControl(), then adds t...

Animating the height of a continer on jQuery.load()

I'm using $('#container_div').load(url) to populate a div via ajax. I would like to animate the height to the height of the returned content but really cant figure out how to achieve this. I've tried using something like this: $('#main').fadeOut(function() { $('#main').load(url, function(data) { var newHeight = $(data).height();...

How can multiple clients be notified of a single users actions? Web based channels...

Lets say we have a web based application where users login to their own channel. And our server manages and maintains a list of users, and their current ip addresses. When someone logs in, is it possible for each client to receive a notification of this users login? Equally if someone logs out, a similar notification would be generated....

How to do live updating similar to Google Docs?

I want to do something very similar to Google Doc's live updating - where all users can "immediately" see the actions of the other users in the doc. To achieve this, my ideas so far: Continuous AJAX requests being done in the background (this would seem performance-intensive)? Surely there's not a way for the server to push notificat...

A good library or some good tutorial for making secure chat web application using PHP,JAVASCRIPT

hello i want to make a secure web based chat application(just for the learning purpose) so suggest me a good library or tutorial page for that. i want to include these feature in my chat application: 1.one to one chat 2.one to may chat(group chat) 3.online friends should be displayed. 4.store chat history. i am using: PHP,JAVASCRI...

Who Add "_" Single Underscore Query Parameter?

I have a PHP server running on Apache, I get lots of request looks like this, 10.1.1.211 - - [02/Sep/2010:16:14:31 -0400] "GET /request?_=1283458471913&action=get_list HTTP/1.1" 200 547 0 "http://www.example.com/request" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729)" 28632...

How do you handle Ajax calls to the controller in ASP.Net MVC

One of the beauties of MVC is the ability to use Actions for both normal web calls as well as Ajax calls. But in doing so, I'm a little uncomfortable with my code. I'd like to know what other people think. So I want to view the details of an item in a list. I have created a Details view. I also have decided to use hijaxing -- if a user ...

Enabling Client-Side Validation in ASP.NET MVC 2 and AJAX

Scott Gu wrote an excellent article explaining how to apply the Data Annotation validation in ASP.NET MVC 2. I have implemented the items in this article for the server-side work, and it works well. I get back error messages when there is a problem. I tried to add the code to also hook in client-side error messages (so a message is disp...

Ajax Call using jQuery in Rails app

I already have a form with normal HTTP post. Now, I want to rewrite this form usign jQuery Ajax request. Here is what I have: register_user.html.erb <%= form_tag :action=> "register_user" %> <label for="user_id_1">user_id_1:</label><br/> <%= text_field "user", "user_id_1", :...

What are some good JavaScript/AJAX interface patterns for websites?

I really like how sites like FogBugz and Facebook offer snappy user interfaces by loading page content asynchronously. What are some good resources and patterns for applying this to other websites? I am looking for a solution that creates a unique hash URL for each page, preserves history and basic browser functions, and degrades gracef...

IE's XMLhttpRequest's getResponseHeader("Content-Length") absent when Content-Encoded sent

Why won't IE let me see the get the Content-Length header with getResponseHeader()? I know there the headers are being sent; I can see them with Wireshark. IE just won't let me get them. If the Content-Encoding header is NOT sent, regardless of if the content-is gzipped or not, I can get them just fine. Sample Code: function getX...

Part of a page to stay loaded throughout the website.

I was wondering if it was possible to have one element only loaded once upon visiting my website. In other words, I have a <div> which contains a bunch of different spritely backgrounds, and I was wondering if I could only have that single <div> load once, and then, each time an end-user loads a different page, that <div> stays the same...

Updating Cells One After Another With Break From Database

I have a Excel like online spreadsheet for some purpose and it's almost done and working perfect but there is a issue I am facing and want to rectify. You can see spreadsheet there at http://partydesigners.site50.net/Excel%20Like%20App/Index.html The issue is that at one single time more than 1 users are using this spreadsheet and if ...

How to get data out of JQuery getJSON callback

I need to get the JSON object data out of the callback function so that I can process it later in page, not within the callback as I am now. It must be obvious to everyone else as I can't see anything written about it. Can anyone tell me how to do it? Here is my code: <script type="text/javascript" src="/site_media/js/jstree/_lib/jquer...

how to show progress immediately using ajax?

I have a demo using jQuery ajax to invoke web service,at the same time,another of a request shows the progress. Why it not show progress immediately, while the last to show all the progress. The code like this: WebService.ashx(c#): public class WebService : IHttpHandler { public void ProcessRequest(HttpContext context) { ...

jQuery .load : Response ok but content not loading

I'm using jQuery with CI for loading a view in this tag: <div id="browseresults"> </div> This script is placed after the </body> tag: <script type="text/javascript">//<![CDATA[ jQuery.noConflict(); jQuery(document).ready(function() { //Load the results view jQuery('#browseresults').load("<?= base_url() . $th...