S
Sharon
Hi!
The solution to my problem is probably fairly simple, I just don't
know how to do this, so I hope someone will show me. Thanks in
advance!
Here's the thing:
I have a function that filters, using different XSL-sheets depending
on the filter selected by the user, e.g. you can filter on name is
"Bob" (positive filtering) or name is NOT "Bob" (negative filtering).
To pick the right XSL, I use the variable 'm' (for 'mode') in the
function 'loadsheet' (see below).
Now I also want to write a function that sorts my filtered data when a
column header is clicked in the filtered table. In order to do that
correctly, I have to know the filter mode (m), to be able to run the
same filter again AND sort at the same time. How can I pass the value
of mode (m) to the new function? I don't want to call the new function
and execute it, I just want the new function to know which mode has
been selected to filter the data. This shouldn't be too hard, I just
can't think of anything... Thanks!
function loadsheet(m){
var sheet=new ActiveXObject('MSXML2.FreeThreadedDOMDocument');
if (m=="pos"){
sheet.load("/lib/xtable/xTablepos.xsl");
}
else if (m=="neg"){
sheet.load("/lib/xtable/xTableneg.xsl")
};
return(sheet);
}
The solution to my problem is probably fairly simple, I just don't
know how to do this, so I hope someone will show me. Thanks in
advance!
Here's the thing:
I have a function that filters, using different XSL-sheets depending
on the filter selected by the user, e.g. you can filter on name is
"Bob" (positive filtering) or name is NOT "Bob" (negative filtering).
To pick the right XSL, I use the variable 'm' (for 'mode') in the
function 'loadsheet' (see below).
Now I also want to write a function that sorts my filtered data when a
column header is clicked in the filtered table. In order to do that
correctly, I have to know the filter mode (m), to be able to run the
same filter again AND sort at the same time. How can I pass the value
of mode (m) to the new function? I don't want to call the new function
and execute it, I just want the new function to know which mode has
been selected to filter the data. This shouldn't be too hard, I just
can't think of anything... Thanks!
function loadsheet(m){
var sheet=new ActiveXObject('MSXML2.FreeThreadedDOMDocument');
if (m=="pos"){
sheet.load("/lib/xtable/xTablepos.xsl");
}
else if (m=="neg"){
sheet.load("/lib/xtable/xTableneg.xsl")
};
return(sheet);
}