The problem you have is the control you're looking for is not in the collection your iterating.
The for loop:
for (var i = 0; i < oCheck.length; i++)
Is checking the oCheck object for controls. oCheck is:
var oCheck = divCheck.getElementsByTagName("input");
divCheck is:
var divCheck = document.getElementById("somecheckbox");
This means, in your for loop, you checking the contents of 'somecheckbox' for input elements. The input element you're trying to find isn't a child to 'somecheckbox' and as such would not part of the oCheck collection.
As you're only targeting a single submit button I'd change the code to the following:
window.onload = function () {
var divCheck = document.getElementById("somecheckbox");
var oCheck = divCheck.getElementsByTagName("input");
var oSet = document.getElementById("edittobeset");
for (var i = 0; i < oCheck.length; i++) {
if (oCheck[i].type == 'checkbox') {
oCheck[i].onclick = function () {
if (this.checked == true) {
oSet.value += this.value + ".";
}
}
}
}
var oSubmit = document.getElementsByTagName('submit')[0];
oSubmit. önclick = function () {
alert("ddddd");
}
}