so basically this is what I have its 2 sets of radio buttons named budget, premier and superior which values are $2,$3 and $5 respectively. a checkbox that if checked the value would make the the first group of radios multiplied by 2 if not it will remain the same
the second group would be weekly, monthly and annually which the values will be multiplied to 1,x\(52/12) and 52 respectively to everything above. the total would be displayed as an alert message
if the none of the first group is selected an alert would be issued when calculate is pressed and that would be please select level of cover and if none of the second group is selected it would display please select frequency of payment but if none is selected at all both alerts would be displayed on a single dialogue box, i cant make a script to make it function properly
thanks in advance for the help i didnt include the script because i suck it doesnt work
function checklevels() {
var level==0;
if (document.getElementById(budget).checked) {
level+=2;
}
if (document.getElementById(Premier).checked) {
level+=3;
}
if (document.getElementById(Superior).checked) {
level+=5;
}
if (document.getElementById(levels).null) {
alert('Plese select the level of cover');
}
}//end of checklevels
function checkfamily() {
var family=1;
if (document.getElementById(includeFamily).checked) {
level+=2;
}
}//end of checklevels
function checkpayment() {
var pay==0;return false;
if (document.getElementById(Weekly).checked) {
level+=1;return true;
}
if (document.getElementById(Monthly).checked) {
level+=52 / 12; return true;
}
if (document.getElementById(Yearly).checked) {
level+=52; return true;
}
if (document.getElementById(payment).null) {
alert('Plese select the frequency of payment');
}
}//end of checkpayment
function getTotal() {
alert (level * family * pay;)
}//end get total
</script>
a checkbox that if checked the value would make the the first group of radios multiplied by 2 if not it will remain the same
You want to double the rate in the final calculation, or do you want to change the rates displayed in the first set of radio buttons every time the user checks/unchecks the includeFamily checkbox?
And you want to display the final result or an error when calculate is pressed, so you’re going to have to add a onclick action to that button.
wow thank you i didnt know that those codes actually existed
@guido2004 centered effect did actually what i wanted
@centered effect thanks a lot bro, i think i love you hahah and yes my html needs work long way for me to go, to be actually completely honest to myself now my task is to learn what you actually did thanks again cheers
Yes it does
Even more I think than what centered effect already pointed out in his post. When you’ve digested all of centered effect’s code, do post your form in the HTML forum to get some other expert’s advice. HTML and CSS are the basis of websites. Javascript is the topping