views:

43

answers:

2

My application is a real-time apps using ajax environment. It is a live picking of schedule. The users want see the available slot in real-time way. such that they can see other ticking schedule. And i'm using ajax to replace the element with the new one. Example:

$.get(my_url, function(data){  $('#area').innerHTML(data); });

On success the element with an ID 'area' will be replaced with the new generated html response so that it looks 'real-time'.

+2  A: 

Use the load() function

$('#area').load(my_url);
nickf
A: 

Not sure what you mean by fastest, but the easiest is this:

$('#area').load(my_url);

Which does the same thing your $.get request does.

Doug Neiner