JQ/JS Data Retrieval and Use


createDynamicTable($("#tbl"), 1, 7);
//create a 1X7 table
var which= $("#tbl td");
which.mouseover(function() { 
//point to one of the cells
$('.msg').load('testfile.html #3')
//retrieve into 'msg' data with id 3
$('#buffer').load('demofile.html ol li');
//load data into 'buffer'
var index = $(which).index(this);
//Yields the index of the pointed-to cell.

I need a way to load by id without having to do a ‘switch’ each time.
I’ve tried things such as var m= “#” +index;, then using m in the call.
Didn’t work. Also tried storing the id in .data when table is created.
Retrieving and using that value didn’t work either.
I can load all the data, but then I need a way to access
a specific li or div. I tried using .get() but got nowhere.

I’ve posted examples at http://centerproto.zapto.org/prob01
and http://centerproto.zapto.org/prob02.

A solution, or alternate suggestion, for either will be greatly appreciated.