Focal Point
[SOLVED] Javascript using inline html to copy text boxes

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7941065503

November 05, 2008, 11:23 AM
Harry M Cleveland
[SOLVED] Javascript using inline html to copy text boxes
Okay, this is not a true WebFOCUS question - it is more of a javascript issue that I cannot get to work within WebFOCUS. However, I am desperate enough to post it in hope that someone my have come up against this before.

It's been about a year since I wrote my last javascript. It's remarkable how much I have forgotten in the last year - not that I was a boy genius to begin with.

I am trying to use a Radio button with an onclick event. I want to copy 'everything' in one select box to another select box.

I have code that allows a consumer to double click on a field in box F and have it copy to box G and visa vera. This works great; however, I want to be able to click on a radio button and copy all items in box F to box G.

Here is the radio button and the html for select box F and G:
<input type="radio" name="OUTEN" id="DA" value="ALL" onClick="displayAll[document.forms['ezform'].elements['F'])">Display All Fields 

Here are the select boxs for F and G. The !IBI.FIL.HOLDLIST; contains a list of dynamically generated field names that contains x number of entries
<select size="10" name="F" id="F" style="width:230;" 
ondblclick="moveItem(document.forms['ezform'].elements['F'],document.forms['ezform'].elements['G']);">!IBI.FIL.HOLDLIST;
</select>



<select size="10" name="G" id="G" style="width:230;" 
ondblClick="moveItem(document.forms['ezform'].elements['G'],document.forms['ezform'].elements['F']);">
</select>



Here it the script I have been playing with. I know that each item in box F is being put into the array (I use the alert to verify that). I cannot figure out had to pass the contents of the array over to box G.


[/code]function displayAll(toListG)
{
// This function is used to move all fields names to from/to