0

Please help
I am stuck on how to click checkbox and put area code in textfield

<?php $array1 = array("(516)","(631)","(718)"); ?>
<?php $AreaCode = $array1; ?>
<td><input name="Phone" type="text" value="<?php echo $array1[0] ?>" size="15" />
<input name="RadioGroup1" type="radio" id="RadioGroup1_0" value="<?php echo $array[0]; ?>" checked="checked" />
<label>(516)</label>
<input type="radio" name="RadioGroup1" id="RadioGroup1_1" value="<?php echo $array[1]; ?>" />
<label>(631)</label>
<input type="radio" name="RadioGroup1" id="RadioGroup1_2" value="(718)" />

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by lotpb
0

If you are wanting the area code to enter into the textbox after a click, use the onclick event (JavaScript).

0

Still dont work

<?php $array1 = array("(516)","(631)","(718)"); ?>
<td><input name="Phone" type="text" value="<?php echo $array1; ?>" size="15" />
<input name="RadioGroup1" type="radio" id="RadioGroup1_0" onclick="<?php echo $array[0]; ?>" value="" checked="checked" />
<label>(516)</label>
<input name="RadioGroup1" type="radio" id="RadioGroup1_1" onclick="<?php echo $array[1]; ?>" value="" />
<label>(631)</label>
<input name="RadioGroup1" type="radio" id="RadioGroup1_2" onclick="<?php echo $array[2]; ?>" value="" />
<label>(718)</label><br />
<label>(###)###-####</label>
</td>

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.