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.c lassName=''};
if (!Value) {selectedItem=p arentByTag('TR' )} else
{selectedItem=d ocument.getElem entById(Value)} ;
if (!!selectedItem ){selectedItem. className='sele cted'};
}
And here's what I have so far regarding the modal dialog...Probab ly
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.showM odalDialog('/lib/xtable/target.html','' ,'dialogWidth:4 00px;
dialogHeight:20 px; 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'!
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.c lassName=''};
if (!Value) {selectedItem=p arentByTag('TR' )} else
{selectedItem=d ocument.getElem entById(Value)} ;
if (!!selectedItem ){selectedItem. className='sele cted'};
}
And here's what I have so far regarding the modal dialog...Probab ly
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.showM odalDialog('/lib/xtable/target.html','' ,'dialogWidth:4 00px;
dialogHeight:20 px; 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'!
Comment