I have multiple listboxes on the left and on a single click I have to move values to the right listbox.
So to attain this I have introduced array and push the array value to target listbox.
Now I am unable to select values from the target listbox.This message has been edited. Last edited by: Ramya,
WebFocus 7702 HTML
June 22, 2016, 10:09 AM
Francis Mariani
I think this is a question for a JavaScript forum.
WebFOCUS Dev Studio HTML Composer has a built-in double listbox control - have you tried using that?
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
June 22, 2016, 10:18 AM
Squatch
It sounds like you are corrupting the right listbox. You need to create OPTION tags before adding values:
var x = document.getElementById("listbox5");
var option = document.createElement("option");
option.text = "Kiwi";
option.value = "Kiwi";
x.add(option);
App Studio WebFOCUS 8.1.05M Windows, All Outputs
June 23, 2016, 02:42 AM
Ramya
quote:
var x = document.getElementById("listbox5");
Hi Squatch,
Thanks for your valuable input. I was using the same code but instead of x.add(option) I was using x.options.add(option) which actually troubled.
for (var y=0;y<=list.length;y++)
{ var oOption = document.createElement("OPTION"); oOption.text = list[y]; oOption.value = list[y]; listbox4.options.add(oOption); // I have changed this code line to listbox4.add(oOption); and looks working perfectly }