tags:

views:

21

answers:

1

Hi

I got 3 web machines, and on admin page, on each of that machines, i want to have informations from all of them, showed in 3 same sections like: http://jqueryfordesigners.com/demo/tabs.html (3 times same, but from other machines).

How to modify that script, to show info from other machines ?

    $(function () {
        var tabContainers = $('div.tabs > div');
        tabContainers.hide().filter(':first').show();

        $('div.tabs ul.tabNavigation a').click(function () {
            tabContainers.hide();
            tabContainers.filter(this.hash).show();
            $('div.tabs ul.tabNavigation a').removeClass('selected');
            $(this).addClass('selected');
            return false;
        }).filter(':first').click();
    });

When im cliking on tab, i want to generate url, which will be send to other machine and reply should be shown in that tab.

A: 

You have to do the request to the machine itself server side (ie. with a php script opening a socket to that machine) and then call the php script with ajax, parse its output and show it in one of the tabs.

Simone Margaritelli
i was thinking about using XMLHttpRequest to do it. But still dont know how to integrate it with presented code
Jurij Gagarin
with XMLHttpRequest you can NOT execute requests to other domains (ie. if you are on www.siteA.com, you can't request something to www.siteB.com with AJAX), so first of all you have to create a script that do the request server side and that give the output back to you.
Simone Margaritelli