View Single Post
  #2 (permalink)  
Old April 4th, 2005, 12:13 AM
vinod_yadav1919 vinod_yadav1919 is offline
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hii Hatchingabrain !!
Hope this will help you

 <form name="myform">
<input type=text name="textbox" > <br>
<input type=radio name="rad_btn" value="A" onclick="setInput()">A <br>
<input type=radio name="rad_btn" value="B" onclick="setInput()">B <br>
<input type=radio name="rad_btn" value="C" onclick="setInput()">C <br>
<input type=radio name="rad_btn" value="D" onclick="setInput()">D <br>
<input type=radio name="rad_btn" value="E" onclick="setInput()">E <br>
</form>

<script>

// document.myform.rad_btn[0] checkbox A.
// document.myform.rad_btn[1] checkbox B.
// document.myform.rad_btn[2] checkbox C.
// document.myform.rad_btn[3] checkbox D.
// document.myform.rad_btn[4] checkbox E.

function setInput()
{



if(document.myform.rad_btn[1].checked)
{
document.myform.textbox.disabled=false
document.myform.textbox.size=25

}

if(document.myform.rad_btn[4].checked)
{
document.myform.textbox.disabled=false
document.myform.textbox.size=10
}


if(document.myform.rad_btn[2].checked)
{
document.myform.textbox.value=""
document.myform.textbox.disabled=true;

}


}

</script>

Cheers :)

vinod
Reply With Quote