Gecks1982
May 18th, 2005, 05:24 AM
Hi i am new at this and am trying to assign a value to a radio within a function.
I think I have the If statement right but I read that I will need a FOR loop. I need help to write this one.
here is the If statment within the function
if (frmHotel.RmStyle.value == 0){varRoomStyle = "55"};
else{if(frmHotel.RmStyle.value == 1) {varRoomStyle = "65"}
else {varRoomStyle = "80"};};
Then in my code I have enteed the radio buttons as such
<INPUT TYPE=Radio NAME= "RmStyle" value = 0>
<INPUT TYPE=Radio NAME= "RmStyle" value = 1>
<INPUT TYPE=Radio NAME= "RmStyle" value = 2>
I know its probably something really simple.
Regards
CLUELESS!!!
I think I have the If statement right but I read that I will need a FOR loop. I need help to write this one.
here is the If statment within the function
if (frmHotel.RmStyle.value == 0){varRoomStyle = "55"};
else{if(frmHotel.RmStyle.value == 1) {varRoomStyle = "65"}
else {varRoomStyle = "80"};};
Then in my code I have enteed the radio buttons as such
<INPUT TYPE=Radio NAME= "RmStyle" value = 0>
<INPUT TYPE=Radio NAME= "RmStyle" value = 1>
<INPUT TYPE=Radio NAME= "RmStyle" value = 2>
I know its probably something really simple.
Regards
CLUELESS!!!