//Generate HTML Checkbox List...
var options = 10;
var macroTitle = 'Generate HTML Checkbox List: ';
function isPosInt( val ){
if(val != NaN){
//is a number
if(val > 0){
//is positive
if(parseInt(val) == val){
//is an integer
return true;
}
}
}
return false;
}
var newName = prompt(macroTitle + 'Name of Checkbox List: ', 'myChecklist');
var optionsValid = false;
while(!optionsValid){
var newOptions = prompt(macroTitle + 'Number of Options: ', options);
var newOptionsAsNum = Number(newOptions);
if( isPosInt(newOptionsAsNum) ){
newOptions = newOptionsAsNum;
optionsValid = true;
} else {
alert('You must enter a valid Integer.');
}
}
for(var i=0;i Checkbox_' + i + '
');
}