Problem Solved! well kind of anyway... someone kindly sent me this code below:
<script type="text/javascript">
function validate(nForm){
var nIssue = document.getElementsByName('issue');
var temp = [];
for (i=0; i<nIssue.length; i++)
{
if (nIssue.checked)
{
temp[temp.length] = nIssue.value;
}
}
if (temp.length == 0)
{
alert('You must select publication month(s)');
return false;
}
alert('Thank you. You chose:\n' + temp.join('\n'));
return true;
}
function init(){
var monthName = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
var refDate = new Date();
refDate.setHours(0,0,0,0);
var nIssue = document.getElementsByName('issue');
for (i=0; i<nIssue.length; i++)
{
nIssue.parentNode.firstChild.data = monthName[refDate.getMonth()] + " " + refDate.getFullYear();
nIssue.value = monthName[refDate.getMonth()] + " " + refDate.getFullYear();
refDate = new Date(refDate.getFullYear(),refDate.getMonth()+1,1);
}
}
navigator.appName == "Microsoft Internet Explorer" ? attachEvent('onload', init, false) : addEventListener('load', init, false);
</script>
<style type="text/css">
body {background-color: #fffacd; margin-top: 60px;}
form {width: 620px; margin: auto; font-family: 'times new roman'; font-size: 12pt;}
fieldset {width: 620px; padding-left: 10px; background-color: #eee8aa; border: 1px solid #e6b280;}
legend {font-family: arial; font-size: 14pt; color: #000000; background-color: transparent; padding-top: 3px;
padding-left: 3px; padding-right: 3px; margin-bottom: 5px;}
.issueLabel {font-family: tahoma; font-size: 10pt; margin-right: 10px;}
.submitBtn {background-color: #fff8dc; border: 1px solid #000000; font-family: arial; font-size: 10pt;
font-weight: bold; cursor: pointer; display: block; margin-left: auto; margin-right: auto;
margin-top: 5px; margin-bottom: 5px;}
</style>
</head>
<body>
<form action="" method="post" onSubmit="return validate(this)">
<fieldset>
<legend>Form</legend>
<label>Select Issue Publication Month(s)</label>
<br>
<label class="issueLabel"> <input type="checkbox" name="issue"></label>
<label class="issueLabel"> <input type="checkbox" name="issue"></label>
<label class="issueLabel"> <input type="checkbox" name="issue"></label>
<label class="issueLabel"> <input type="checkbox" name="issue"></label>
<label class="issueLabel"> <input type="checkbox" name="issue"></label>
<label class="issueLabel"> <input type="checkbox" name="issue"></label>
<label class="issueLabel"> <input type="checkbox" name="issue"></label>
<label class="issueLabel"> <input type="checkbox" name="issue"></label>
<label class="issueLabel"> <input type="checkbox" name="issue"></label>
<label class="issueLabel"> <input type="checkbox" name="issue"></label>
<label class="issueLabel"> <input type="checkbox" name="issue"></label>
<label class="issueLabel"> <input type="checkbox" name="issue"></label>
<input type="submit" name="submit" value="Submit" class="submitBtn">
However, first off I was trying to work out how to change the code so that the 'issue' field became issue1,issue2 to match each month. But! thee must be an easier way to do this... I will explain in next post
</fieldset>
</form>