...

View Full Version : Urgent checkbox and radiobutton help



vijk2001
08-26-2002, 04:00 PM
Hi <all>

I need this tricky solution which is urgent..pls do help me out.

I have a form with about 20-25 controls on it and at the end is the submit button.
After the submit (at bottom of form i need) the following:

MESSAGE : incoming (radio button) outgoing (radio button)

If incming is checked i need 4 checkboxes A/B/C/D
If outgoing is selected i need 4 checkboxes A1/B1/C1/D1

These checkboxes should become visible on form ONLY when appropriate radio button is clicked..AND i want all these at END /bottom of my form..

How do i do this???
Pls do help.
Regards
vij

premshree
08-26-2002, 04:26 PM
Try this :



<html>
<head>
<title>Select</title>
<script language="JavaScript">
function disp(divName)
{
document.getElementById(divName).style.display="block";
}
function hide(divName)
{
document.getElementById(divName).style.display="none";
}
</script>
</head>
<body bgcolor="#FFFFFF">

<!--BEGIN FORM-->
<form name="form1">
<input type="radio" name="radio1" onClick="disp('div1');hide('div2');" checked> Incoming
<input type="radio" name="radio1" onClick="disp('div2');hide('div1');"> Outgoing
<!--BEGIN CHECKBOX SET 1-->
<div id="div1" style="display:none">
<input type="checkbox" value="a"> A
<input type="checkbox" value="b"> B
<input type="checkbox" value="c"> C
<input type="checkbox" value="d"> D
</div>
<!--END CHECKBOX SET 1-->
<!--BEGIN CHECKBOX SET 2-->
<div id="div2" style="display:none">
<input type="checkbox" value="a1"> A1
<input type="checkbox" value="b1"> B1
<input type="checkbox" value="c1"> C1
<input type="checkbox" value="d1"> D1
</div>
<!--END CHECKBOX SET 2-->
</form>
<!--END FORM-->

</body>
</html>


:thumbsup:

vijk2001
08-26-2002, 04:39 PM
Hi premshree..
It works absolutely fine EXCEPT for one small problem which was there earlier too.

The two radio buttons plus checkboxes INFACT it gets positioned ABOVE the TITLE /HEADER of my form.I want these controls
incoming and outgoing to be positioned at the bottom of my form as the last control NOT the first ones at top.

I embedded the code at the bottom after my last control that is the Submit button but still gets positioned at top ..
WHY?

vijk2001
08-26-2002, 04:48 PM
THANKX A LOT..
I got it worked out..
Thankx premshree.....
Vij



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum