Version 10 Design Studio

 1 Replies
 0 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
Brett Eshenour
Basic Member Send Private Message
Posts: 6
Basic Member
We are in the process of upgrading to V10. We have numerous custom design studio forms that use dme calls to populate a list box on the form. Under V9 the sample code below populates the list box beautifully. On V10 the same code does not function. The DOM getElementById returns a null, we worked around that and got rid of the errors but it will not populate the list box. Has any one else run into issues with Design Studio form list boxes under V10 and would you be willing to share your work around if you were successful in getting it to work? Thx Brett //SAMPLE CODE BELOW
function BuildDegrees()
{
        vDegree_Array[0]   = "one";
        vDegree_Array[1]   = "two";
        vDegree_Array[2]   = "three";
        vDegree_Array[3]   = "four";
        vDegree_Array[4]   = "five";
        var vDegCount      = 5;
var objSelect0 = document.getElementById("VALUES_l60");   //Should point to the degree dropdown on the screen
        alert(objSelect0);
for (i=0;i
{       alert("Loading drop down: " + vDegree_Array);
LoadtVals(vDegree_Array, objSelect0);  // move it to the drop down box 'span'
}     //end loop to load the drop down
}             //end function Build Degrees
//*****************************************************************************************************
//  function LoadtVals
//*****************************************************************************************************
function LoadtVals(pString, pSelect)
{
tVals0 = document.createElement("span");
tVals0.setAttribute("id", pString);
tVals0.setAttribute("tran", pString);
tVals0.setAttribute("disp", pString);
tVals0.setAttribute("text", pString);
pSelect.appendChild(tVals0);
  alert(pSelect);
}      //end of function LoadtVals
Brett Eshenour
Basic Member Send Private Message
Posts: 6
Basic Member
Well I never replied to my own post's before, but there always a first time. Figured out that in Version 10 the document.getElementById returns an HTMLSelectElement object that you are working with. The code below will populate the list box correctly. Now the challenge is getting it in work in the Custom Apps. My example below is very simple. The actual answer I used to build it can be found at http://stackoverflow.com/...ns-to-select-element Brett
        var objSelect0 = document.getElementById("_l66");   //Should point to the degree dropdown on the screen
        alert("DOM get element by id .vlaue  : " + objSelect0.value);       
//
//      experiment
//
        for (i=0;i
        {
         alert("Attempting to load list box : " + vDegree_Array);
                objSelect0.options.add( new Option( vDegree_Array));
        }