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     [CLOSED] hiding options from listbox
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] hiding options from listbox
 Login/Join
 
Platinum Member
posted
Hi we have a listbox with more than 100 values.
We have a edit box above that through which the user can filter the values in the listbox.

Suppose the listbox has values - AUDI, JENSEN, HONDA
When the user types 'J' in the edit box the listbox shows only JENSEN and hides the rest.

This works fine in chrome and Edge but it is not working in IE - 11
Let us know if anybody has faced this earlier or have a solution for this.

function Custom_SearchSortList_onkeyup(event) {
var eventObject = event ? event : window.event;
var ctrl = eventObject.target ? eventObject.target : eventObject.srcElement;
// TODO: Add your event handler code here
 var SortFldFrmList = IbComposer_getComponentById('customselect1_selectfrom').options;
 var EventFldFrmList = IbComposer_getComponentById('EventSpecific_list').options;
var SearchString = ctrl.value.toLowerCase().replace(/ /g, " ");
for (i=0;i<SortFldFrmList.length;i++){
    var optionValue = SortFldFrmList[i].innerHTML.toLowerCase();
     if ( optionValue.indexOf(SearchString) < 0 ){
        SortFldFrmList[i].setAttribute("hidden","hidden");

}
    else{
        SortFldFrmList[i].removeAttribute("hidden");
        console.log("present");
}
}
}  


The options are updated with hidden="hidden" but the option in the page are still visible in the list box

WF8206

This message has been edited. Last edited by: FP Mod Chuck,
 
Posts: 175 | Registered: October 25, 2017Reply With QuoteReport This Post
Expert
posted Hide Post
I would CHAIN the editbox to the listbox using a fex to capture the incoming value from the editbox as a filter and populate the listbox accordingly.

I would not use JavaScript to do this as CHAINing is built into WebFOCUS.


   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Most recent: 8204 Gen 48 in Test and Production.
 
Posts: 3045 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Instead of setting visibility, try setting display to none / block or in jquery .hide() .show()


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6136 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
I guess I'm not understanding your post.

Are you wanting to hide the values,&Value, that only satisfy a WHERE statement as shown in the next line? Or, are you wanting to hide some 'options'? If 'options', then what options are they?
WHERE MODEL LIKE '%&Value.EVAL%'
 
Posts: 3045 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
I'm not understanding your post




Clarity is important in Focal Point

Claret would be better.
Cool


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6136 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
Clarity is important in Focal Point
Yes Smiler So, what am I not understanding?
 
Posts: 3045 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
No reply from Siva1925


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6136 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] hiding options from listbox

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