Jump to content

Listbox to send multiple parameters at once


Recommended Posts

After following a couple of threads on the related topic, I still cannot figure this out... 

 

I have a report page that shows a chart that has the search above the chart. The search is just a listbox that allows multiple entries by holding control. I have the below script in my footer along with a Virtual Field (Virtual1) hidden that is passing parameter Virtual1.

I have a second pie chart on the page below that takes the parameter from Virtual1 as CONTAINS. However, this pie chart will not work based on the script below. I believe the parameter is not passing at all, and I am not sure why. Does anyone see any issue? Here is my current website I am testing this out on: https://simionehhaclaims.weebly.com/dashboard-v2.html

The pie chart should be pulling up below the bar/line combo chart but it will not work.

<script type="text/javascript">


var fieldName = "Value1_1";
var x1=document.getElementsByName(fieldName);
x1[0].multiple=true;
function splitAndParse()
{
var result = "";
var cleanResult = "";
for (var i = 0; i < x1[0].length; i++) {
if (x1[0].options.selected) {
result += "\""+x1[0].options.value+"\"" + " OR " ;
}
}
document.getElementById("cbParamVirtual1").value = result;
}


setTimeout(splitAndParse, 20); 


</script>

 

Link to comment
Share on other sites

  • 2 weeks later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...