tags:

views:

37

answers:

1

OK, i have this jQuery script using ajax to load a response from a php file, but i want to do is to load maybe two variables from the php script rather than the whole page.

$(document).ready(function() {
 $.ajaxSetup({
    cache: false
 });
$("#object_area").load("test.php");
   var refreshId = setInterval(function() {
      $("#object_area").load("test.php");
   },10000);
});

So what i want is to be able to say load variable1 from the php page into object_area, then load variable2 into object_area2 if that makes sense?

Thanks

+1  A: 

Hello

What about return your variables in JSON format with the dedicated PHP function ?

(don't forget to properly set the headers)

You could manipulate your variables more simply with JQuery

G. Qyy