Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Double-Listbox Code

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Double-Listbox Code
 Login/Join
 
Guru
posted
Hi all,

In 7.6.9 there seems to be a bug in the Double-Listbox control which is being investigated. Two mis-behaviors are that it automatically moves the first item on the SelectFrom list to the SelectTo list and changing the contents of the SelectFrom list removes all the contents of the SelectTo list.

Meanwhile, I want to create the basic functionality of the double-listbox (just the MoveTo and MoveFrom bits). The javascript for those functions is tucked away in the ibirls_.js file.

Can you point me to a resource where I might find the MoveTo and MoveFrom functions so I can manually add them to my html page?

Thanks!

Dan

This message has been edited. Last edited by: Dan Pinault,


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Guru
posted Hide Post
Here is some code I modified from Move Items Between 2 ListBoxes.
  
<html>
<head>
<script>
    function MoveItem(ctrlSource, ctrlTarget) {
        var Source = document.getElementById(ctrlSource);
        var Target = document.getElementById(ctrlTarget);

        if ((Source != null) && (Target != null)) {
            while ( Source.options.selectedIndex >= 0 ) {
                var newOption = new Option(); // Create a new instance of ListItem
                newOption.text = Source.options[Source.options.selectedIndex].text;
                newOption.value = Source.options[Source.options.selectedIndex].value;
                
                Target.options[Target.length] = newOption; //Append the item in Target
                Source.remove(Source.options.selectedIndex);  //Remove the item from Source
            }
        }
    }
</script>

</head>
<body>
<table  cellpadding="5" cellspacing="5">              
    <tr>
        <td>
            <select id="listbox1" size="3" style="width: 75px; height: 75px;" multiple="multiple">
                <option value="1">One</option>
                <option value="2">Two</option>
                <option value="3">Three</option>
            </select>
        </td>
        <td align="center" " style="width: 75px; height: 75px;">
		        <div>
                <input onclick="Javascript:MoveItem('listBox1', 'listBox2');" type="button" value="->" />
				</div>
				<div>
                <input onclick="Javascript:MoveItem('listBox2', 'listBox1');" type="button" value="<-"/>
				</div>
        </td>
        <td>
            <select id="listbox2" size="3" style="width: 75px; height: 75px;" multiple="multiple">
                <option value="4">Four</option>
                <option value="5">Five</option>
                <option value="6">Six</option>
            </select>
        </td>
    </tr>                  
</table>
</body>
</html>


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Guru
posted Hide Post
Wow! Too funny. That is the exact same web page I found yesterday. I started playing with it and it seems to do what I need.

Thanks!


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Double-Listbox Code

Copyright © 1996-2020 Information Builders