Once the buttons are created, is there anyway I can add a link or use window.location method like this: `window.location = 'nextpage.html?foo=number'. I currently have this

```
var typeValue = location.search;
var typeStringValue= typeValue.replace("?type=","");
var containers = typeValue.replace("?type=multi","");
var containersValue = parseInt(containers);
var sampleLetter = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];

function createButton(buttonName){
    var buttonDivBlock = document.getElementById("sampleSets");
    var buttonElement = document.createElement("input");
        buttonElement.setAttribute("type","button");
        buttonElement.setAttribute("name",buttonName);
        buttonElement.setAttribute("value","Sample Set"+" "+buttonName);
        buttonElement.setAttribute("id",buttonName);
        buttonDivBlock.appendChild(buttonElement);
     // document.getElementById(sampleLetter[i]).setAttribute('onclick',window.location='SampleInfo.html'+typeStringValue+bottonName);<!--add the button link -->
}

function setButtons(numberOfContainers){

     for(i=0;i<numberOfContainers;i++){
         createButton(sampleLetter[i]);

     }
}

window.onload = function(){
    setButtons(containersValue);
}

```

But `document.getElementById("'"+sampleLetter[i]+"'").setAttribute('onclick',window.location='SampleInfo.html'+typeStringValue+bottonName);<!--add the button link -->` 
returns a null value.