how can i send two parameters in a script?

we have a form, (see file attached), when i select a box, the radio button "yes" should be selected by script

<SCRIPT>
function GETONcheck(i)
{
document.getElementById(i).checked = true;

}
</SCRIPT>

Open in new window



 	<INPUT id=radio8 type=radio name=q17 value="1" <% if fq17 = "1" then response.write "checked" end if  %> >
  				<%=q20%>&nbsp;</td>
			   	<td>
				</td>
		   	</tr>
			 <tr>
			   	<td style="height: 21px">
			   	<INPUT id=radio9 type=radio name=q17 value="2" <% if fq17 = "2" then response.write "checked" end if  %>>
			   	<%=q21 %>&nbsp;</td>
			   	<td style="height: 21px"></td>
	   		 </tr>

	   		 
	   		 
		   	
			   		 
			   		 
			   		 
					 <tr>
					
			   	<td>
			   	<table cellpadding="0" cellspacing="0" style="width: 100%">
					<tr>
						<td width="25px">&nbsp;</td>
						<td><INPUT id=q18 type=checkbox name=q18 onchange="GETONcheck('q17')"  <%if request.querystring("fq18") = "on" then response.write "checked" end if  %>>&nbsp;<%=q30 %></td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td><INPUT id=q19 type=checkbox name=q19 onchange="GETONcheck('q17')" <%if request.querystring("fq19") = "on" then response.write "checked" end if  %>>&nbsp;<%=q31 %></td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td><INPUT id=q20 type=checkbox name=q20 onchange="GETONcheck('q17')" <%if request.querystring("fq20") = "on" then response.write "checked" end if  %>>&nbsp;<%=q32 %></td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
					</tr>
				</table>

Open in new window




so, if i check box 18, 19 or 20, radiobutton 17 has to be checked, with value 2 (in this case, true).

you know how to do that?
B--script.png
fedkrisAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Luis PérezSoftware Architect in .NetCommented:
Replace your
onchange="GETONcheck('q17')"
with
onchange="GETONcheck('radio9')"

Because inside GETONcheck you use GetElementById, the Id of the radiobutton is "radio9", not "q17".

Hope that helps.
0
fedkrisAuthor Commented:
hi, thx for answer, when i change that, he doesn't check the checkbox (yes)...
0
Luis PérezSoftware Architect in .NetCommented:
Have you changed it in all your checkboxes (three of them)?
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

fedkrisAuthor Commented:
yes, but it doesn"t work
0
Luis PérezSoftware Architect in .NetCommented:
Can you post your actual code (with changes inserted)?
0
RobOwner (Aidellio)Commented:
I think  you need a structure to control your logic such as knockoutjs & jquery

Here is a demo of what you want utilising knockout: http://jsbin.com/necij/1/edit?html,js,output

<!DOCTYPE html>
<html>
	<head>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/knockout/3.0.0/knockout-min.js"></script>
		<meta charset="utf-8">
		<title>JS Bin</title>
	</head>
	<body>
		<table>
			<tr><td>
		<input id='radio8' type='radio' name='q17' value="1" data-bind="enable: mytest()==1,checked: mytest"/>q17-1
		&nbsp;</td>
		<td>
		</td>
		</tr>
	<tr>
		<td style="height: 21px">
			<input id='radio9' type='radio' name='q17' value="2" data-bind="checked: mytest"/>q17-2
			&nbsp;</td>
		<td style="height: 21px"></td>
	</tr>
	<tr>
		<td>
			<table cellpadding="0" cellspacing="0" style="width: 100%">
				<tr>
					<td width="25px">&nbsp;</td>
					<td><input id='q18' type='checkbox' name='q18' data-bind="checked: q18" />q18</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><input id='q19' type="checkbox" name='q19' data-bind="checked: q19" />q19</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><input id='q20' type='checkbox' name='q20' data-bind="checked: q20" />q20</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td>&nbsp;</td>
				</tr>
			</table>
	</body>
</html>

Open in new window


$(function() {
	viewmodel = {
		q18: ko.observable(false),
		q19: ko.observable(false),
		q20: ko.observable(false),
		myradio: ko.observable()
	};
	viewmodel.mytest = ko.computed({
		read: 
		function(){
			if (viewmodel.q18() || viewmodel.q19() || viewmodel.q20())
				return "2";

			return "1";
		},
		write: function(val) {
			viewmodel.myradio(val);
		}
	});

	ko.applyBindings(viewmodel);
});

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GaryCommented:
I've requested that this question be deleted for the following reason:

The question has either no comments or not enough useful information to be called an "answer".
0
RobOwner (Aidellio)Commented:
Fully working demo in my comment

http:#a40243127
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.