Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Chained combo boxes and the 'ALL' option
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Chained combo boxes and the 'ALL' option
 Login/Join
 
Member
posted
I have created an HTML page with several chained combo boxes. I have checked the box to add "ALL" option. What I would like to do is if the number of options in the drop down contains only a single value then show that value rather than 'ALL'. The number of values varies and what the values are change as the chaining is being resolved.

This message has been edited. Last edited by: Keith_Tice,


WebFOCUS 8009, All Outputs
 
Posts: 26 | Registered: February 28, 2013Reply With QuoteReport This Post
Guru
posted Hide Post
This isn't too difficult. The easiest way I could think of would be to use the onbeforeload event on the second control to delete the "all" value if only two items exist (the "all" value and the other value). Your code might look like this:

//Begin function combobox2_ononbeforeload
function combobox2_ononbeforeload(ctrl,arrValuesToLoad) {
   if(arrValuesToLoad.length === 2) {
      arrValuesToLoad.splice(0,1);
   }
}
//End function combobox2_ononbeforeload 


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Reply With QuoteReport This Post
Member
posted Hide Post
J,

That works great! Thank you so much for the quick reply.


WebFOCUS 8009, All Outputs
 
Posts: 26 | Registered: February 28, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Chained combo boxes and the 'ALL' option

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.