View Single Post
Old 01-27-2013, 02:56 PM   PM User | #3
naveendk.55
New Coder

 
Join Date: Aug 2011
Posts: 88
Thanks: 5
Thanked 0 Times in 0 Posts
naveendk.55 is an unknown quantity at this point
Question

below is the code for loadValues and other functions

PHP Code:
function showState4(){
        var 
me document.getElementById('stk1');
         var 
values ''//populate selected options
         
for (var i=0i<me.lengthi++)
             if (
me.options[i].selected)
                 
values += me.options[i].value ',';
         
values values.substring(0values.length-1);
         var 
selected=[values];

         var 
temp= new Array();
            
temp values.split(",");

         var 
del document.getElementById('StakeHolder');

         for(var 
i=0i<del.lengthi++)
           {
             for(var 
j=0;j<temp.length;j++)
              {  

                  if(
temp[j] == del.options[i].value)
                    {

                       
del.options[i].selected true;
                    }
               }  
           }
         }

     function 
loadValues()
     {
    var  
RD_REQ_RT_ID "<%=RD_REQ_RT_ID %>";
    if(
RD_REQ_RT_ID=="null")
     {
    
document.getElementById('requestType').value="";
     }
     else{
    
document.getElementById('requestType').value=RD_REQ_RT_ID;
    }
    )


_

     
function sureTransfer(fromtoall) {
    if ( 
from.getElementsByTagName && to.appendChild ) {
        while ( 
getCount(from, !all) > ) {
            
transfer(fromtoall);
        }
    }
     }
     function 
getCount(targetisSelected) {
    var 
options target.getElementsByTagName("option");
    if ( !
isSelected ) {
        return 
options.length;
    }
    var 
count 0;
    for ( 
0options.lengthi++ ) {
        if ( 
isSelected && options[i].selected ) {
            
count++;
        }
    }
    return 
count;
    }
    function 
transfer(fromtoall) {
    if ( 
from.getElementsByTagName && to.appendChild ) {
        var 
options from.getElementsByTagName("option");
        for ( 
0options.lengthi++ ) {
            if ( 
all ) {
                
to.appendChild(options[i]);
            } else {
                if ( 
options[i].selected ) {
                    
to.appendChild(options[i]);
                }
            }
        }
    }
     } 
naveendk.55 is offline   Reply With Quote