Hi y'all,
I'm trying to figure out how to tackle this problem: I have an XML
table with a cool grid in which users can select a table row. When
they right-click on a cell, they get a modal dialog window with a
selection menu. What I want this thing to do is display the different
values in the row, so that users can make a selection: eventually I
want it to be a filter option > in the selection menu, users can
select the value on which they want the whole table to be filtered.
However, I'm seriously lacking js-skills so I don't know how I should
pass the values from the table row to the selection menu. I hope
someone can give me a hint...
Here's the function that selects a row in the table:
function rowClick(Value)
{
if (!!selectedItem) {selectedItem.className=''};
if (!Value) {selectedItem=parentByTag('TR')} else
{selectedItem=document.getElementById(Value)};
if (!!selectedItem){selectedItem.className='selected' };
}
And here's what I have so far regarding the modal dialog...Probably
very lame & ugly since I have never done this before and I'm still in
the trying-out-phase...
function cellClick()
{if (event.button==2){window.showModalDialog('/lib/xtable/target.html','','dialogWidth:400px;
dialogHeight:20px; center: yes; edge: raised; help: no; resizable:
yes; scroll: no; status: no;');
}
}
Thanks very much, hope I have provided enough information, if not I'll
be quick to add some mo'!