Joined today and my first question to the Forum (I'm a novice so please forgive me if I ask dumb things about coding)! My web form contains some search fields and a pivot table, all on one page. For searching I use a submission form with virtual fields to pass parameters to the Pivot table report.
Two of my virtual search fields are “Region†(listbox), and “Country†(cascading listbox with “Region†as the Parent), but I need to have ‘multi-select’ for BOTH listboxes. Thanks to this Forum I’ve managed to get multi-select ‘sort of’ working, using JavaScript in the footer:
<SCRIPT LANGUAGE="JavaScript">
/* "Note that ‘cbParamVirtual1’ = the ‘Region’ listbox (ie Parent) */
/* " ‘cbParamVirtual2 = the ‘Country’ cascading listbox. */
var fieldName1 = "cbParamVirtual1";
var fieldName2 = "cbParamVirtual2";
var x1=document.getElementsByName(fieldName1);
var x2=document.getElementsByName(fieldName2);
x1[0].multiple=true;
x2[0].multiple=true;
</script>
The problem:
If I select just one region in Parent listbox, I happily get all the countries associated with that region in the cascading listbox. And I can go on to multi-select those countries. Perfect!
BUT, if I multi-select, say “N.America†AND “Europeâ€, then my ‘Country’ cascading listbox just states “No options availableâ€. What I want is for it to list all the countries in both , “N.America†+ “Europeâ€. Somehow my multi-selections from the Parent just aren't being recognised. (Needless to say, this all works seamlessly in a tabular report format).
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
Farnsbarnes
Hi All…
Joined today and my first question to the Forum (I'm a novice so please forgive me if I ask dumb things about coding)! My web form contains some search fields and a pivot table, all on one page. For searching I use a submission form with virtual fields to pass parameters to the Pivot table report.
Two of my virtual search fields are “Region†(listbox), and “Country†(cascading listbox with “Region†as the Parent), but I need to have ‘multi-select’ for BOTH listboxes. Thanks to this Forum I’ve managed to get multi-select ‘sort of’ working, using JavaScript in the footer:
<SCRIPT LANGUAGE="JavaScript">
/* "Note that ‘cbParamVirtual1’ = the ‘Region’ listbox (ie Parent) */
/* " ‘cbParamVirtual2 = the ‘Country’ cascading listbox. */
var fieldName1 = "cbParamVirtual1";
var fieldName2 = "cbParamVirtual2";
var x1=document.getElementsByName(fieldName1);
var x2=document.getElementsByName(fieldName2);
x1[0].multiple=true;
x2[0].multiple=true;
</script>
The problem:
If I select just one region in Parent listbox, I happily get all the countries associated with that region in the cascading listbox. And I can go on to multi-select those countries. Perfect!
BUT, if I multi-select, say “N.America†AND “Europeâ€, then my ‘Country’ cascading listbox just states “No options availableâ€. What I want is for it to list all the countries in both , “N.America†+ “Europeâ€. Somehow my multi-selections from the Parent just aren't being recognised. (Needless to say, this all works seamlessly in a tabular report format).
I’d very much appreciate any help.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.