Trying to change a function from populating with images from a .txt file, to populating with another html page code snippet

Trying to change a function from populating with images from a .txt file, to populating with another html page code snippet

Hi all,
I'm only new to Jquery and Ajax for that matter, understand JavaScript but don't work with it everyday.

I have a function from Jcarousel that is populating a div with images (talking to a .txt file which contains the url), JavaScript then writes out the image.

function getItemHTML(data)
{
    var split = data.split(";");
    var url   = jQuery.trim(split[0]);
    var title = jQuery.trim(split[1]);
    var url_m = url.replace(/_s.jpg/g, '_m.jpg');
    return '<a href="' + url_m + '" title="' + title + '" class="thickbox"><img src="' + url + '" width="' + 75 + '" height="' + 75 + '" alt="' + title + '" /></a>';
};

and this is the function talking to the datasource

function loadItemHandler(carousel, start, last, available)
{
    if (available) {
        // Trigger loaded
        carousel.loaded();
        return;
    }
 
    var cr = carousel;
 
    jQuery.get("example_dynamic_ajax.txt", function(data) {
        appendItemCallback(cr, start, last, data);
    });
};


Now what I would like to do is instead of populating with images from .txt file I would like to populate with code from another .html page (a html page containing a table code)

I'm just not entirely sure what object i need to use and how to go about that.

Full code that I am working with is here
http://www.e-excel.lu/static/js/jcarousel-dir/example_dynamic_ajax.html

Any help would be much appreciated