I have a problem with two checkboxes .
I need to change value of the output depending on if one or two checkboxes were checked.
Please take a look at the code and tell me what needs to be between the {} in Java Script. THANK YOU!!
[COLOR=”DarkRed”]
<head>
<SCRIPT TYPE=”text/javascript” LANGUAGE=JAVASCRIPT>
function checkCheckBoxes() {
if (document.form1.selectedProd.checked == true && document.form1.selectedProd2.checked == true)
{
[COLOR=”Red”]I need to put something here that sends to the server
slectedProd as a “name” and value=”u3″. And this is the only thing that should be send. slectedProd2 should not be sent.
}
}
//–>
</head>
<body>
<form name=”form1″ method=”POST”>
<input type=”checkbox” id=”N1″ name=”selectedProd” value=”u”>1</p>
<input type=”checkbox” id=”N2″ name=”selectedProd2″ value=”u2″>2</p>
<input type=”submit” value=”Submit” name=”submit” onclick=”checkCheckBoxes();” />
</form>
</body>
</html>