I call a javascript function to do this. Each time a radio button is clicked this piece of code is called. If the limit is reached you get the popup message.
Modify the WeeklyEntry.asp file...
Declare a local variable to keep count
dim mylimit
mylimit = 5
Place this piece of code inside each input you want to keep tabs on. e.g. each radio button
onclick="countChoices(this,this.form,<% =mylimit %>);"
Place this piece of code somewhere accessible. ie at the bottom of the page of code or in custom.asp You may have to play with the line that reads type=="checkbox" to get it to count radio buttons as i use it to count checkboxes.
<script language=javascript type="text/javascript">
function countChoices(oo,ff,imax)
{ //start function
var oElement = ff.elements, jj = 0;
for(var icounter=0; icounter<oElement.length; icounter++)
{ //start first for loop
if(oElement[icounter].type=="checkbox")
{
if(oElement[icounter].checked)
{
jj++;
}
}//end first for loop
} // end for loop
if(jj > imax)
{
alert("Sorry. The Joker limit for this week is "+imax+".");
oo.checked = false;
return false;
}
} //end function
</script>
Good luck!