Display None Not Working

The end of my code is not working. div2[i].style.display = none; I don’t understand why it won’t work.


addOnload(function()
{
    var link = document.getElementById('associateRequests');
    var link2 = document.getElementById('associateRequests2');
      
    if (link)
    {
        link.onclick = function()
        {
            var uid = link.href.split('=');
            uid = uid[1];
            
            ajax.get('/assets/ajax/partner_review.php?uid=' + uid, function(responce)
            {
                var info = eval('(' + responce + ')');
                var i;
                
                lightbox.show(info[0], function(body)
                {   
                    var row = [];   
                    var div1 =[];
                    var a =[];
                    var img =[];
                    var span =[];
                    var div2 =[];
                    var div3 =[];
                    var input1 =[];
                    var input2 =[];
                    var requestform =[];
                    
                    for (i = 0; i < info[1].length; i++) 
                    {
                        
                        row[i] = document.createElement('div');
                        div1[i]         = document.createElement('div');
                        a[i]            = document.createElement('a');
                        img[i]         = document.createElement('img');
                        span[i]         = document.createElement('span');
                        div2[i]        = document.createElement('div');
                        div3[i]        = document.createElement('div');
                        input1[i]        = document.createElement('input');    
                        input2[i]        = document.createElement('input');
                        requestform[i]    = document.createElement('form');
                        input1[i].type = 'submit';
                        input2[i].type = 'submit';
                        
                        input1[i].value = 'Accept';
                        input2[i].value = 'Deny';
                        
                        input1[i].name = info[1][i].uid;
                        input2[i].name = info[1][i].uid;
                        
                        requestform[i].name = 'requestform';
                        requestform[i].method = 'post';
                        requestform[i].action = 'http://mysite.com/home.php';
                        
                        a[i].href = 'http://mysite.com/u/' + info[1][i].username;
                        a[i].setAttribute('target', '_blank');
                        
                        addClass(row[i], 'lb_row');
                        
                        img[i].src = info[1][i].avatar;
                        img[i].alt = info[1][i].displayName;
                        
                        row[i].appendChild(div1[i]);
                        
                        a[i].appendChild(img[i]);
                        div1[i].appendChild(a[i]);
                        addClass(div1[i], 'lb_div');
                        addClass(div1[i], 'tdfirst_review');
                        addClass(img[i], 'avatar extrasmall vmiddle');
                        
                        span[i].appendChild(document.createTextNode(info[1][i].displayName));
                        a[i].appendChild(span[i]);
                        addClass(span[i], 'lb_span');
                        
                        div2[i].appendChild(input1[i]);
                        row[i].appendChild(div2[i]);
                        addClass(div2[i], 'lb_div_button');
                        addClass(div2[i], 'lb_align');
                        
                        div3[i].appendChild(input2[i]);
                        row[i].appendChild(div3[i]);
                        addClass(div3[i], 'lb_div_button');
                        addClass(div3[i], 'lb_align');
                        addClass(div3[i], 'right');
                        
                        requestform[i].appendChild(row[i]);
                        body.appendChild(requestform[i]);
                        
                        input1[i].onclick = function() 
                        {
                            ajax.get('/assets/ajax/partner_accept.php?uid=' + this.name, function(responce)
                            {
                            	div2[i].style.display = none;
                            });
							return false;
                        }
                        
                        input2[i].onclick = function() 
						{
                            ajax.get('/assets/ajax/partner_deny.php?uid=' + this.name, function(responce)
                            {
                            	div2[i].style.display = none;
                            });
                            return false;
                        }
                    }
                });
            });
        
            return false;
        }
    }
});

Quote attribute values.

Quote attribute values.

div2[i].style.display = ‘none’;