Complicated n Specified Problem (Radio Button)

admin

Administrator
Staff member
hi there,

i am having problem in changing radio button to 'no need approval' in Need approval field once i click on 'Live'radio button in Schedule field. To see the working code :

<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkChoice(schedule) {
if (schedule == 1) {
document.pickform.approval[1].checked = true;
}
}
// -->
</script>
</HEAD>
<BODY>
<center>
Please select your favorite shedule:
<form name=pickform>
<table>
<tr><td>
<input type=radio name=approval value=http://www.phpbuilder.com/board/archive/index.php/"1">Need Approval
<br>
<input type=radio name=approval value="0">No Need Approval
<br>
<input type=radio name=schedule value="0">Static
<br>
<input type=radio name=schedule value="1" onClick=checkChoice(this.value)>Live
<br>
</td></tr>
</table>
</form>
</center>

now i want to change the name of radio button approval to object[approval] for php send object use like

<input type=radio name=approval value="1">Need Approval

to

<input type=radio name=object[approval] value="1">Need Approval

But, i just don't how to change the javascript above. I have tried to put in
like:

document.pickform.object[approval][1].checked = true;

in Javascript statement.
but, it won't work. Any ideas?
 
Back
Top