By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,680 Members | 2,091 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,680 IT Pros & Developers. It's quick & easy.

pass value to function

P: n/a
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);
}
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"well, duh, ever heard of global variables?"
<oops>
thanks for not reacting and leaving it to me to realise I was being
very silly, everyone...I knw it was simple!
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.